The Lotto-Soudal rider clinched his third stage win on the Tour this year ahead of his compatriot John Degenkolb (Giant-Alpecin), with Norwegian Alexander Kristoff (Katusha) taking third place at the end of a hilly 183km ride from Mende.
Greipel launched his sprint with about 200 metres left and held off Degenkolb to bag his ninth stage win on the Tour.
Briton Chris Froome retained the overall leader's yellow jersey after staying safe in the bunch all day in an unchanged top 10 in the general classification.
The Team Sky rider leads Colombian Nairo Quintana of Movistar by 3:10 with American Tejay van Garderen (BMC Racing) in third place, 3:32 off the pace.