Yes as mentioned very safe and a great workout for pregnancy.
Swimming is an excellent activity for pregnancy! Especially if you were swimming before pregnancy. The water offers good resistance and bouyancy which can take some of the pressure off later in pregnancy. Just don't push yourself too hard, keep your pace steady, and if you feel you're having trouble keeping your breathing steady or if you get a cramp, stop and give yourself a break. The point is to be active, not to break records or push yourself too hard.