If water enters the body, either through the mouth or through other orifices of the body, then the fast is invalidated. In swimming, water anyhow enters the body through the mouth, ears, nose or other orifices. As such, swimming is not permissible when one is fasting.
And Allah Most High knows best.
Mufti Syed Ziauddin Naqshbandi Qadri
[Shaykh ul Fiqh, Jamia Nizamia,
Founder-Director, Abul Hasanaat Islamic Research Center]