Is it safe to go swimming in a pool while pregnant?

I ask because I would think all that chlorine wouldn’t be good for the baby I haven’t been able to ask my dr. But figured maybe one of you guys have?