Olympic gold medalist Kyle Chalmers has had a third operation on his heart in a bid to keep his preparations for next year's Tokyo Olympics on track.

The 21-year-old Australian swimmer posted an update on Instagram after the operation on Monday, saying "3rd time lucky ... fingers crossed today's heart surgery fixed the problem once and for all."

Chalmers won the 100-meter freestyle title at the 2016 Olympics in Rio de Janeiro and placed second in the 100 free at the world championships last month in South Korea, where he collected four medals.

He was diagnosed at age 12 with a condition called supraventricular tachycardia, which can cause a rapid heartbeat, shortness of breath and fainting.

Australia's swimming trials for the Olympics are scheduled for June next year.

Chalmers has shown previously that he's capable of recovering from surgery to compete at his peak.

He had a heart operation in 2017 and recovered by 2018 to win four gold medals at the Commonwealth Games and win the 100 free at the Pan Pacific Championships in Tokyo.