Starting in the old town, you can swim off the rocky outcrops under the two Buza bars. The spaces between the rocks have been cemented and there are steps for easier access into the water. The city beach of Banje is about 300m from the old town and because of it’s accessibility is the most crowded. My choice is to continue for about a kilometer until you get to Sveti Jakov or St Jacob Beach with less crowds and a nice beach-side bar.
If you’re taking a bus, then Lapad Bay has loads of hotel beaches that can be used even if you’re not staying at the hotels.
My personal recommendation is Dance Beach on the western side of the old town, outside Pile Gate. The beach lies below the remnants of one of the oldest 15th century Ragusan lazarettos. Keep in mind this is an open water beach without harbour shelter, it can get quite choppy so it might not be suitable for children.
A child-friendly beach is Copacabana Beach on Babin Kuk with shallow waters and a slippery-slide.