Macron announced the fast timescale -- for a process some experts said would take decades -- in an address to the nation where he hailed how the disaster had shown the capacity of France to mobilise and unite.
Pledges worth around 700 million euros (USD 790 million) have already been made Tuesday from French billionaires and businesses to restore the Gothic masterpiece.
Most of the roof has been destroyed, its steeple has collapsed and an unknown number of artifacts and paintings have been lost. The main organ, which had close to 8,000 pipes, has also suffered damage.
But the cathedral's walls, bell towers and the most famous circular stained-glass windows at France's most visited tourist attraction remain intact.
"We will rebuild the cathedral even more beautifully and I want it to be finished within five years," Macron said from the Elysee Palace. "And we can do it."
Macron said that the dramatic fire had brought out the best in a country riven with divisions and since November shaken by sometimes violent protests against his rule.
"Our history never stops and that we will always have trials to overcome," he said.
Images from inside the cathedral Tuesday showed its immense walls standing proud, with statues still in place and a gleaming golden cross above the altar.
However the floor was covered in charred rubble from the fallen roof and water while parts of the vaulting at the top of the cathedral had collapsed.
Junior interior minister Laurent Nunez told reporters at the scene that work to secure the structure would continue into Thursday, allowing firefighters access to remove remaining artifacts and artworks.
He said the building had been saved within a critical time window of 15-30 minutes by a team of 400 firefighters who worked flat out throughout the night.
Though "some weaknesses" in the 850-year-old structure had been identified, overall it is "holding up OK", he added.
French fire chiefs had earlier dismissed as "risible" comments by Trump that the fire should be tackled with water bombers, saying this risked destroying the entire edifice of the cathedral.
The Paris fire service said that the last remnants of the blaze were extinguished Tuesday, 15 hours after the fire broke out.
Renovation work on the steeple, where workers were replacing its lead covering, is widely suspected to have caused the inferno after the blaze broke out in an area under scaffolding.
"Nothing indicates this was a deliberate act," Heitz told reporters, adding that 50 investigators had been assigned to what he expected to be a "long and complex" case.
But experts had warned a full restoration will take many years. "I'd say decades," said Eric Fischer, head of the foundation in charge of restoring the 1,000-year-old Strasbourg cathedral.
Thousands of Parisians and tourists watched in horror Monday as flames engulfed the building and rescuers tried to save as much as they could of the cathedral's treasures.
Many more came Tuesday to the banks of the river Seine to gaze at where the roof and steeple once stood.
A firefighter suffered injuries during the blaze, which at one point threatened to bring down one of the two monumental towers on the western facade of the cathedral that is visited by 13 million tourists each year.
(This story has not been edited by Business Standard staff and is auto-generated from a syndicated feed.)