Patrick Vieira and Thierry Henry scored as France secured their place in the knockout stages of the World Cup.
France needed victory to ensure their progress from Group G, but they were frustrated by a spirited Togo defence during a goalless first half.
But Vieira, celebrating his 30th birthday, eased the nerves as he fired home from inside the box on 55 minutes.
And Henry turned before sending in a low shot six minutes later to set up a second round tie against Spain.
The win seemed comfortable in the end, but it was anything but for much of the opening hour as France looked in real danger of making an early exit from the competition.
Raymond Domenech's men were held out by a Togo back line which proved far more resilient than it did against South Korea and Switzerland.
The pattern of the game was set early on when David Trezeguet's seventh-minute header was acrobatically tipped over by Kossi Agassa.
Henry then put Franck Ribery through, but the Marseille midfielder chose to pass to Trezeguet, who was judged offside as he put the ball into the net.
Ribery then shot wildly over when put through by Henry on 29 minutes.
Such missed opportunities just added to France's nerves as they saw many promising attacking positions come to nothing.
Togo keeper Agassa was in inspired form, repelling France attacks, most notably in the first half when he stopped Florent Malouda's stinging drive.
After the interval, France were straight back on the attack and Trezeguet's shot from Ribery's low pass was deflected wide more by luck than judgement.
Ribery was, in fact, to prove the most profligate of the France attackers, as he repeated his first-half howler when he hammered high and handsome after Malouda's low cross picked him out.
It was beginning to look like one of those nights for France - until the birthday boy intervened.
Ribery - atoning for his earlier misses - passed to Vieira who turned and slammed home past Agassa from inside the box.
Still Togo threatened to stun their feted opponents, and France were pleased to see Willy Sagnol block a goalbound shot from Emmanuel Adebayor.
But five minutes later, Arsenal striker Henry made the game safe as he latched on to Vieira's flick-on and turned before firing a typically clinical shot into the net.
The second goal killed the match as a contest and France held out for the win - but they know they will need to improve if they want to overcome Luis Aragones' in-form Spain.