His support for Macron, which had been expected, is another boost for the reformist liberal.
His support for Macron, which had been expected, is another boost for the reformist liberal, who left Valls's Socialist government last year to form his own political movement, which he says is "neither right nor left."
The first round of the election is on April 23, with Macron and far-right leader Marine Le Pen predicted to go through to the second round run-off on May 7.
Asked on French television if he would vote for the 39-year-old former economy minister, Valls said: "Yes, because I think you should not take any risks for the Republic. So, I will vote for Emmanuel Macron."
Valls's allusion to "risks for the Republic" was seen as a reference to a possible Le Pen win.
The former prime minister's decision to opt for Macron was a further blow for the struggling Socialist candidate Benoit Hamon.
Polls currently show Macron easily beating Le Pen in the second round, but after Britain's shock vote to quit the EU and Donald Trump's surprise election in the United States there remains significant potential for an upset.
Macron immediately thanked Valls for his support but said it did not mean the ex-premier would secure a top job in his administration if he won, saying he aimed to "renew the faces" in French politics.
Rivals are likely to pounce on Valls's thumbs-up as proof of their claim that Macron is a Trojan horse for centrists within the Socialist Party, represented by President Francois Hollande and Valls.
That faction lost out in January's Socialist primary, with left-winger Hamon storming past Valls to win the party's nomination on a tide of disaffection with the government's pro-business policies.
But Hamon has failed since to unite the party around him.
"I didn't expect there to be so many betrayals," Hamon complained last week, accusing his Socialist detractors of having "stabbed him in the back."
Defence Minister Jean-Yves Le Drian has also come out in favour of Macron.
The candidates from the traditional left and right of the political spectrum have seen their campaigns upended by the youthful Macron -- seen as a fresh face in staid French politics -- and Le Pen.
On the right, Francois Fillon from the Les Republicains party has seen his chances founder on a fake jobs scandal. Once tipped for victory, he has slipped back into third place over charges he misused public funds with payments totalling 680,000 euros ($739,000) to his Welsh-born wife.
On Tuesday, his wife Penelope was charged with complicity in the abuse of public funds in the scandal.
A poll by Ipsos Sopra Steria on Tuesday showed Fillon continuing to languish behind Le Pen and Macron, who were far out in front with 25 and 24 percent respectively, compared to his 18 percent.
Hamon had been overtaken by Communist-backed firebrand Jean-Luc Melenchon, who was shown in fourth place with 14 percent while the Socialist trailed in fifth with 12 percent.