Bolsonaro, 66, said he was ready to return to work and maintain his agenda before leaving the Vila Nova Star hospital in Sao Paulo.
An abdominal stab wound during the 2018 election that brought him to power is the latest health issue for the far-right leader.
Bolsonaro's hospitalization occurred while he confronts difficult elections in nine months, with a low popularity rating.
The president was still wearing his vacation outfit when he addressed the media: the maroon Juventus football shirt from Sao Paulo.
He said he was ready to go to work in 2022, the penultimate year of his four-year tenure.