Yes, PEX plumbing is safe for drinking water when the pipe and fittings are certified to NSF/ANSI 61 and installed to code. The plumbing codes accept PEX for water supply lines, and it does not rust or corrode. Its real risks come from new-pipe odor, sunlight, chewing rodents and badly made fittings.
The certification is what matters. North American plumbing codes require drinking water pipe and fittings, PEX included, to meet NSF/ANSI 61, which limits what a material can leach into the water. That does not mean nothing comes out. A 2014 study of six PEX brands found that new pipe released organic chemicals and gave the water an odor. Levels fell over the first 30 days, though the odor stayed above the EPA’s taste and odor limit, which is an aesthetic standard rather than a health one.
The practical risks come from where and how PEX is installed. Sunlight breaks it down, so it should never be left exposed outdoors. It needs to stay clear of high heat such as a water heater flue, and mice and rats can chew it. The connections are the weak point: a crimp or expansion fitting that is not made correctly can leak behind a wall. Underground, PEX is a common choice for the water line from the meter to the house because it flexes as clay soil moves.
The honest limit is that safe describes certified pipe installed correctly, not every PEX job. A hidden joint cannot be judged from the outside. Do not confuse PEX with gray polybutylene, an older plastic pipe that is worth replacing, as covered in which old plumbing pipes should be replaced. A sound copper system is no reason to repipe with PEX, since age alone does not make a pipe unsafe. The same goes for CPVC, which can last decades.