At age is it safe to start swimming?

All ages. There are classes for infants -- with adult assistance, of course. So, any age can be appropriate under the right conditions and supervision. Youngest I taught was 18 months old. (42 years ago). Find a good program and enjoy the water.
Any age with parent! There are classes for babies as young as 6 months (with their parents of course!) these classes are meant to get babies used to water. However, kids are generally not developmentally really ready to swim on their own until about 5 years. Swimming lessons are a good idea as drowning is a cause of preventable death in children.
At 4 month. Infant swimming programs begin at four months of age, not earlier.
Five or six. Babies can take swim lessons and get used to the water but only with assistance. Kindergartners are ready to take full lessons and swim completely unaided but always with help in close proximity with clear and keen onservation. Witnessed near drowning of 3 year old one month ago with mom standing right in front of the child but looking away for split second.