Nobody knows if it's safe. A big part of the problem is that it's sold as a supplement, not a food, so the manufacturers don't have to verify that they're getting it from a clean, safe source. They could be skimming it off the waste pond at an abandoned chemical plant for all you know. It's known to absorb and concentrate a lot of contaminants, so even if the water is safe to drink, the algae can still be dangerous.
Why did you think you wanted it? It has been shown INeffective for weight loss. It provides iron and B vitamins, but so do a lot of foods that are known to be safe. The only thing it's been tested for that turned out to have even a hint of possibility is that it *might* have a teeny-tiny protective effect against mouth cancer for people who chew tobacco. Not for smokers, though. If you're not vegan and don't chew, there's absolutely no reason you would need spirulina. If you are vegan, there are still safer sources of iron and B vitamins (and if you do chew, you could just quit...)
It's definitely NOT considered safe during pregnancy or for children, mainly because there's no way to know what contaminants it has picked up from the water it has grown in.
My advice is to take it back and get a refund. Just tell them what you told us-- you read the label and it scares you. If you bought it at a reputable place, they'll give you your money back even if you opened the jar. If they won't give you your money back, then you know they're not a reputable place that cares about your safety, and hopefully you'll stop going there.