Swimming on your period

I'm afraid to swim while on my period has anyone tried and is it safe? Or does it make a mess?