Patrick Vieira and Thierry Henry scored as France secured their place in the knockout stages of the World Cup.
Henry's second-half strike made the game safe for France
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.
Vieira celebrated his 30th birthday in the best possible way
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.
Togo: Agassa, Nibombe, Abalo, Tchangai, Aziawonou, Cherif-Toure (Olufade 59), Senaya, Salifou, Forson, Mohamed, Adebayor (Dossevi 75).
Subs Not Used: Agboh, Akoto, Atsou, Erassa, Malm, Obilale, Tchagnirou, Toure, Assemoassa.
Booked: Aziawonou, Cherif-Toure, Salifou.
France: Barthez, Gallas, Silvestre, Thuram, Sagnol, Malouda (Wiltord 73), Makelele, Vieira (Diarra 81), Ribery (Govou 77), Trezeguet, Henry.
Subs Not Used: Boumsong, Chimbonda, Coupet, Dhorasoo, Givet, Landreau, Saha.
Goals: Vieira 55, Henry 61.
Ref: Jorge Larrionda (Uruguay).
Fifa man of the match: Patrick Vieira
France gained their first maximum at the World Cup since the 3-0 victory over Brazil in the 1998 final, ending a five-match winless sequence in the competition, which had equalled their all-time record.
Lilian Thuram won his 117th cap, surpassing Marcel Desailly's record mark of 116 appearances for France. Thierry Henry scored his fifth World Cup goal and is now ranked joint second with Michel Platini on the all-time scorers list for France. Just Fontaine leads this list with 13 World Cup goals.
Patrick Vieira became the sixth player in World Cup history to score on his birthday. In 1982, Michel Platini was the first French player to do so and he repeated this feat four years later.
Trivia Stats source: Infostrada Sports