This article is more than
8 year oldHe said Indonesia respected human rights but there would be "no compromise" when it came to punishing such sexual crimes.
Indonesia passed controversial laws earlier this month authorising chemical castration for paedophiles.
The laws were subject to fierce debate in parliament.
The Indonesian Doctors Association says its members should not be involved as the procedure would violate medical ethics.
Chemical castration is the use of drugs to reduce sex drive and libido, without sterilisation or removing organs.
The paedophiles who want treatment
President Widodo said "our constitution respects human rights, but when it comes to sexual crimes there is no compromise".
"We are strong and we will be very firm. We will hand out the maximum penalty for sexual crimes."
He added: "In my opinion… chemical castration, if we enforce it consistently, will reduce sex crimes and wipe them out over time."
In a wide-ranging interview with the BBC's Yalda Hakim, President Widodo - also known as Jokowi - discussed topics including the South China Sea, corruption, a recent tax amnesty and the government's stance on homosexuality.
Earlier this month, an advert for a new youth ambassador position stipulated that members of the lesbian, gay, bisexual and transgender (LGBT) community need not apply.
The government advert said the post was only open to applicants not involved in "sexually deviant behaviour".
President Widodo said there was no discrimination against minorities, but he added: "We are the world's largest Muslim nation and we have religious norms. You have to remember that and know that. We have social norms."
You cannot cure paedophilia by chemical castration.
How long can it last? Let's say the patient has it for three years while in jail. But after his release he can go to a doctor and reverse it with hormone therapy. Chemical castration is not completely irreversible, so it is not effective.
Furthermore, the punishment cannot be done as long as the executor is a medical doctor, because we have to uphold medical ethics. When you become a doctor, you have to swear that you won't do anything harmful to any human being.
My message to all doctors across Indonesia is that as long as you're a doctor, you cannot do it, even if the government says it is to punish a rapist.
It is harmful and it's against human rights.
Dr Prijo Sidipratomo is chairman of the medical ethics committee at the Indonesian Doctors Association.
On the subject of the ongoing maritime rights dispute in the South China Sea, Mr Widodo defended Indonesia's stepped-up military presence around the Natuna Islands.
He said the Indonesian military was acting to stop illegal fishing in the area.
"This is our natural resources, this is Indonesian wealth. So from now on illegal fishing vessels cannot play around with us," he said.
"The second thing is Natuna is our territory. Natuna is in Indonesia. So if we want to do military operations, war games, then it's our right. In terms of sovereignty I will never compromise."
He also said the government was cracking down on corruption.
"Nine ministers, 19 governors, 300 more local leaders [and] 100 parliamentarians are in jail because of corruption," he said.
"We are harsh and strict on corruption. We will be consistent in our harshness to improve the situation."
In September, thousands of Indonesian workers protested in Jakarta against a government tax amnesty scheme.
It was meant to plug a budget deficit but unions say it unfairly pardoned wealthy tax dodgers.
"It's not really about how much money we earn from it, how much money is repatriated," President Widoko said.
"The most important thing is this is the start of reforming the tax system in Indonesia.
"We want to expand the tax system, we want to improve the tax system and we want to build trust and faith among people in our tax system so that industry and businesses that pay tax they believe that their money will go to the good of the country and be used to build things."
Newer articles
<p>A US judge has ruled against Donald Trump getting his hush money conviction thrown out on immunity grounds.</p>