He said he is taking hydroxychloroquine, the anti-malaria drug that has not been proven effective against COVID-19.
The 65-year-old populist confirmed the results while wearing a mask and speaking to reporters huddled close in front of him in the capital, Brasilia.
“I'm, well, normal. I even want to take a walk around here, but I can't due to medical recommendations,” Bolsonaro said. “I thought I had it before, given my very dynamic activity. I’m president and on the combat lines. I like to be in the middle of the people.”
Brazil, the world's sixth-biggest nation, with more than 210 million people, is one of the outbreak's most lethal hot spots.
More than 65,000 Brazilians have died from COVID-19, and over 1.5 million have been infected.
Both numbers are the world’s second-highest totals, behind those of the U.S., though the true figures are believed to be higher because of a lack of widespread testing.
Bolsonaro has often appeared in public to shake hands with supporters and mingle with crowds, at times without a mask. He has said that his history as an athlete would protect him from the virus and that it would be nothing more than a “little flu” if he were to contract it.
He has also repeatedly said that there is no way to prevent 70% of the population falling ill with COVID-19 and that local authorities' efforts to shut down economic activity would ultimately cause more hardship than allowing the virus to run its course.
Bolsonaro repeated those sentiments Tuesday, likening the virus to a rain that will fall on most people and saying that some, like older people, must take greater care.
Cities and states last month began lifting restrictions that had been imposed to control the spread of the virus, as deaths began to decline along with the occupancy rate in intensive care units.
The World Health Organization’s emergencies chief, Dr. Michael Ryan, wished Bolsonaro a speedy recovery and said his infection “brings home the reality of this virus" by showing that it doesn't distinguish between “prince or pauper.”