The world No.1, who is undefeated at Roland Garros since his only loss in 2009, extended his record to 62-1 on the Paris clay having not dropped a set at this year's event.
The Spaniard made only five unforced errors in the first two sets - 10 in total - even though he was broken in the second as world No.65 Mayer showed his claycourt skills.
Nadal ended the contest with a service winner to set up a meeting with unheralded Serbian Dujan Lajovic, who beat American Jack Sock 6-4 7-5 6-3 and also has yet to drop a set.
Nadal, however, revealed he was suffering from back pains, although he refused to elaborate when quizzed on the matter.
"Well, I'd rather not talk about my back. I've reached week number two. I'll do my best. I'll play as best as I can," he told a news conference.
"I'll put up a good fight to try and win. You know, my back is not that important. It's not that important, because I wouldn't really like to give you too many details.
"I am the way I am, and I'm happy to have reached this level. I won a three-set match, which is important."
His uncle and coach Toni Nadal said: "It was a solid match against a good claycourt player.
"In the second set, after he broke he lost his focus a bit. But he managed to come back and play some good tennis."
Earlier, David Ferrer continued his stroll towards a possible quarter-final clash against Nadal with a 6-2 7-6(2) 6-3 win against Italian Andreas Seppi.
Ferrer blazed through the opening set but let his guard down in the second after an early break and was forced into a tiebreak he won 7-2.
The third set was a mere formality and the fifth seed finished it off on his first match point with one of his trademark forehand winners down the line.
Later on Saturday, eight-times champion Rafa Nadal will be looking to extend his Roland Garros record to 62-1 when he takes on unseeded Argentine Leonardo Mayer.
Results from French Open men's third round
Marcel Granollers (Spain) beat Martin Klizan (Slovakia) 6-7(5) 6-2 7-6(4) 7-5
5-David Ferrer (Spain) beat 32-Andreas Seppi (Italy) 6-2 7-6(2) 6-3
Dusan Lajovic (Serbia) beat Jack Sock (U.S.) 6-4 7-5 6-3
19-Kevin Anderson (South Africa) beat Ivo Karlovic (Croatia) 6-3 (Karlovic retired)
Follow the French Open on up to 7 courts LIVE - Watch this event on Eurosport Player
- Sports & Recreation