Mr Macron won by 66.06% to 33.94% to become, at 39, the country's youngest president.
Mr Macron will also become the first president from outside the two traditional main parties since the modern republic's foundation in 1958.
He said that a new page was being turned in French history.
"I want it to be a page of hope and renewed trust," he said.
Mr Macron said he had heard "the rage, anxiety and doubt that a lot of you have expressed" and vowed to spend his five years in office "fighting the forces of division that undermine France".
He said he would "guarantee the unity of the nation and... defend and protect Europe."
Mr Macron's supporters gathered in their thousands to celebrate outside the Louvre museum in central Paris and their new president later joined them.
In his speech to the crowd, he said: "Tonight you won, France won. Everyone told us it was impossible, but they don't know France."
But he repeated a number of times that the task facing him and the country was enormous.
He said: "We have the strength, the energy and the will - and we will not give in to fear."
His mention of Ms Le Pen drew loud boos, and he said he would do all he could to ensure in future there would be no reason to vote for extremism.
Security remains tight in the capital and there were reports of police firing tear gas at several hundred anti-capitalist protesters near the Ménilmontant metro in the 20th arrondissement.
What has Ms Le Pen said?
In her speech, she thanked the estimated 11 million people who had voted for her. She said the election had shown a division between "patriots and globalists" and called for the emergence of a new political force.
Ms Le Pen said her National Front party needed to renew itself and that she would start the "deep transformation of our movement", vowing to lead it into upcoming parliamentary elections.
She also said she had wished Mr Macron success in tackling the "huge challenges" facing him.
What does Mr Macron stand for?
He is a liberal centrist, pro-business and a strong supporter of the European Union.
He left the Socialist government of President François Hollande last August to form his new movement - En Marche - saying it was neither left nor right wing.
His campaign pledges included a 120,000 reduction in public-sector jobs, a cut in public spending by €60bn (£50bn; $65bn), and a lowering of the unemployment rate to below 7%.
He vowed to ease labour laws and give new protections to the self-employed.
Mr Macron also stood on a pro-EU platform, in stark contrast to his opponent.
Emmanuel Macron's unconventional route to political stardom in France
What has the immediate international reaction been?
Most of those running the EU were breathing a sigh of relief, given Ms Le Pen's policies and last year's Brexit vote.
European Commission chief Jean-Claude Juncker tweeted: "Happy that the French chose a European future."
Meanwhile, US President Donald Trump tweeted his congratulations to Mr Macron for the "big win" and said he looked forward to working with him.
Parisians say they are relieved Mr Macron has beaten Ms Le Pen
German Chancellor Angela Merkel tweeted her congratulations, saying Mr Macron's win was a "victory for a strong united Europe".
UK Prime Minister Theresa May said: "France is one of our closest allies and we look forward to working with the new president."
Former UKIP leader Nigel Farage sounded a dissonant note, saying: "Macron offers five more years of failure" and encouraging Ms Le Pen to "stick in there".
At home, President François Hollande congratulated Mr Macron and said the result showed the French people wanted to unite around the "values of the republic".
What will be Macron's immediate difficulties?
Well, his En Marche grouping has no seats in parliament at all.
Legislative elections follow on quickly from the presidential poll - on 11 and 18 June.
Media captionMacron says he has heard the "rage and anxiety" of the people
En Marche will contest the elections as a party but Mr Macron may find himself needing to pull together a coalition to govern effectively.
Although his presidential candidacy had support from other political parties, much of it stemmed from the need to defeat Ms Le Pen. More than 25% of the electorate abstained from voting, while a record 11.5% of ballots were left blank or spoilt.
He will need to win over the abstainers and those who are sceptical about his political vision. Left-wing voters in particular felt disenfranchised by the choice of the final two candidates.
Mr Macron will also need to tackle the fallout from a hacking attack on Friday, the final day of campaigning, when a trove of documents relating to his campaign, said to include both genuine and fake documents, was released online.