A water heater may use rigid pipe or suitable flexible connectors. Flexible connectors must be listed to ASME A112.18.6 and left accessible. Whether PEX can connect directly depends on the code and the heater. The Uniform Plumbing Code keeps PEX out of the first 18 inches, and Uponor limits direct PEX to electric and power-vented gas heaters.
What kind of connector should a water heater use?
A listed flexible water connector, or rigid pipe. Flexible connectors can make the heater easier to disconnect for service. Rheem's residential manuals, for both gas and electric models, say that "The installation of unions or flexible copper connectors is recommended on the hot and cold water connections so that the water heater may be easily disconnected for servicing if necessary."
The connector itself has to meet a standard. Phoenix's adopted residential code, Section P2906.7, says "Flexible water connectors, exposed to continuous pressure, shall conform to ASME A112.18.6/CSA B125.6. Access shall be provided to flexible water connectors." So a braided stainless or corrugated copper connector should carry that listing on its packaging, and it can't be buried in a wall.
The Uniform Plumbing Code spells out the common types in its water heater connector section, 604.13. In the 2021 edition text published on UpCodes, it lists "Flexible metallic (copper and stainless steel), reinforced flexible, braided stainless steel, or polymer braided with EPDM core connectors." It also says copper, copper alloy or stainless steel flexible connectors "shall not exceed 24 inches (610 mm)."
### Which code applies in Phoenix?
Phoenix enforces several. The city's code history lists the 2024 International Residential Code, the 2024 International Plumbing Code and the 2024 Uniform Plumbing Code among its current adopted codes, effective August 1, 2025. Which one governs a given job depends on the building and the plans, so a permit is the place to confirm it. Other Valley cities adopt their own editions.
Can PEX connect directly to a water heater?
Sometimes. Two sets of rules decide it: the plumbing code and the PEX maker's instructions.
### The code: the 18-inch rule
The Uniform Plumbing Code is direct about it. In the 604.13 text on UpCodes, it says "PEX, PEX-AL-PEX, PE-AL-PE, or PE-RT tubing shall not be installed within the first 18 inches (457 mm) of piping connected to a water heater." Where that rule applies, the first 18 inches off the heater have to be metal, such as a listed metal connector or copper pipe, before the line changes to PEX.
The international codes handle it through the maker's instructions. Phoenix's adopted plumbing code says fittings for PEX tubing "shall be installed in accordance with the manufacturer's instructions." So on those jobs, what the PEX maker allows at a water heater is what counts.
### The manufacturer: electric vs. gas
Uponor, a large PEX maker, sets the limits for its own pipe. Its TotalFit instruction sheet says TotalFit and Uponor AquaPEX pipe "are approved for installation directly to electric water heaters as well as power-vented gas water heaters (where allowed by local code)."
It then adds a clearance rule for vents: "do not install TotalFit or Uponor AquaPEX pipe within 6" (15.2 cm) of a vent pipe for direct or gravity-vented appliances." It also says to keep at least 1 inch from double-wall B vents or zero-clearance plastic vents.
An atmospheric gas water heater has a draft hood and a vent connection above the tank. That's the setup where PEX near the vent is a problem. Other PEX brands have their own rules, so check the instructions for the pipe you're using.
### Putting it together
| Heater | PEX straight to the heater? |
|---|---|
| Electric tank | Allowed by Uponor. Under the UPC, the first 18 inches must still be non-PEX. |
| Power-vented gas | Allowed by Uponor where local code allows, with vent clearance. Same UPC 18-inch rule. |
| Atmospheric (draft hood) gas | Keep PEX 6 inches or more from the vent. Use a metal connector off the heater. |
| Any heater, any code | Follow the PEX maker's instructions and the connector's listing. |
A correctly sized and listed metal connection before the PEX can help meet these requirements, but its actual length, routing and vent clearance still must comply with the applicable code and model instructions.
Do I need dielectric unions?
Often, yes, when copper meets steel. A. O. Smith's gas water heater manual says "To protect against untimely corrosion of hot and cold water fittings, it is strongly recommended that di-electric unions or couplings be installed on this water heater when connected to copper pipe." Many flexible connectors are made with this in mind, so check the listing.
Code also requires a proper transition where copper meets galvanized steel. Phoenix's adopted residential code says those joints "shall be made with a copper alloy fitting or dielectric fitting."
### A catch for electric heaters
Rheem's electric manual warns about grounding: "Non-metallic piping, dielectric unions, flexible connectors etc. can cause the water heater to be electrically isolated." It says water in the pipes "does not provide sufficient conduction for a ground." So on an electric heater, the heater has to be grounded through its wiring, not the plumbing.
What else belongs at the connections?
- A cold water shutoff. Phoenix's adopted residential code says "A readily accessible full-open valve shall be installed in the cold-water supply pipe to each water heater at or near the water heater." Rheem's manuals say the same: "Install a shut-off valve in the cold water line near the water heater."
- No heat on the heater's nipples. Rheem says that if sweat connections are used, solder the tubing to an adapter before fitting it to the heater. Heat on the cold water fittings "will permanently damage the dip tube and the heat traps in the hot/cold nipples." A. O. Smith gives the same warning.
- Thermal expansion control where the system is closed. See whether you need a thermal expansion tank.
The gas line is a separate matter. A. O. Smith calls for "A flexible gas connector or a ground joint union between the shut off valve and control valve to permit servicing of the unit." Water connectors are never used for gas.
### A quick check of your own setup
You can look over an existing installation in a couple of minutes:
- The label. Flexible water connectors should be marked ASME A112.18.6 or CSA B125.6.
- The length. Under the UPC text, metal flexible connectors shouldn't run longer than 24 inches.
- The access. You should be able to see and reach both connectors.
- The vent. On a gas heater with a draft hood, PEX shouldn't sit within 6 inches of the vent pipe.
- The shutoff. The cold line should have a full-open valve you can reach.
If one of those looks wrong, it's worth having a plumber take a look.
Should I do this myself?
Swapping a connector on an electric heater is within reach for a handy homeowner, as long as the water and power are off. A gas water heater is different. Replacing one involves the gas line, the vent and usually a permit. See whether you need a permit to replace a water heater in Phoenix, and whether to repair or replace a water heater if you are weighing both.
HQ installs and repipes water heaters across the Valley with connectors listed for the job. We're licensed and insured, available 24/7, and every estimate is free with upfront pricing.
