It came after unofficial tallies from polling agencies showed him leading with around 53 per cent of the vote against Prabowo's 47 per cent.
Flanked by members of his Indonesian Democratic Party of Struggle in the capital, Widodo said: "We would like to greatly thank all the Indonesian people... As well as party members who worked hard from morning to evening."
There was no immediate reaction from Prabowo.
It came after a bitterly fought campaign that saw long-time favourite Widodo's lead shrink dramatically, voters in the world's third-biggest democracy have faced a choice starkly different candidates.
Prabowo, a former son-in-law of Suharto who has admitted ordering the abduction of democracy activists before the strongman's downfall in 1998, has won support with promises of firm leadership in a country where many yearn for a strong figurehead.
But critics fear he may shift Indonesia back towards authoritarian rule.
Earlier, Widodo was mobbed by hundreds of journalists and supporters as he voted at a polling station near the Jakarta governor's residence in the centre of the capital.
"I'm very optimistic, and God willing we will get support from people everywhere," said the 63-year-old after voting.
"My hope is that the election went well and smoothly, with no fraud and no intimidation."
Some 190 million voters were eligible to cast ballots across the sprawling archipelago of more than 17,000 islands that spans three time zones.
Polling stations closed across the country, from eastern Papua, to the main island of Java and jungle-clad Sumatra in the west, closed at 1:00 pm and no major disruptions to voting were reported.
The Jakarta governor was targeted by smears, including a claim that he is an ethnic Chinese Christian and not a Muslim, a deeply damaging charge in the world's most populous Muslim-majority country.
You’ve reached your limit of {{free_limit}} free articles this month.
Subscribe now for unlimited access.
Already subscribed? Log in
Subscribe to read the full story →
Smart Quarterly
₹900
3 Months
₹300/Month
Smart Essential
₹2,700
1 Year
₹225/Month
Super Saver
₹3,900
2 Years
₹162/Month
Renews automatically, cancel anytime
Here’s what’s included in our digital subscription plans
Exclusive premium stories online
Over 30 premium stories daily, handpicked by our editors


Complimentary Access to The New York Times
News, Games, Cooking, Audio, Wirecutter & The Athletic
Business Standard Epaper
Digital replica of our daily newspaper — with options to read, save, and share


Curated Newsletters
Insights on markets, finance, politics, tech, and more delivered to your inbox
Market Analysis & Investment Insights
In-depth market analysis & insights with access to The Smart Investor


Archives
Repository of articles and publications dating back to 1997
Ad-free Reading
Uninterrupted reading experience with no advertisements


Seamless Access Across All Devices
Access Business Standard across devices — mobile, tablet, or PC, via web or app
