I have read that National Code requires you to use copper for 18 inches from your water heater. How can I do this when everything existing is PEX?

I need to replace my existing low boy water heater next to my kitchen sink. It was installed by the builder ten years ago. All the pipe in the house is PEX. The existing water heater is connected using PEX as well.

The supply line comes directly thru the wall to the HW Heater. There is no space to run 18 inches of copper! The heater is under the kitchen counter, and the countertop is directly over it. Only about an inch clearance.

enter image description here

  • I hope you have checked out the authenticity of this report of a requirement of 18" of copper at the water heater. If it proves to be correct, note that modern water heaters should not have the immediate fittings heated in place on the heater. Commented Sep 20, 2018 at 18:45
  • 1
    As @JimStewart said, check with your AHJ about whether that's actually a requirement. I'm a bit skeptical...
    – Hari
    Commented Sep 20, 2018 at 22:30

6 Answers 6


Although copper may not be required, it is possible that PEX is prohibited.

One reason for this would be building codes / regulations. For instance, the UPC states:

604.11.2 Water Heater Connections. PEX shall not be installed within the first 18 inches (457 mm) of piping connected to a water heater.

The specifics of what your local regulations state can vary widely, so you should inquire with your local officials.

Another potential restriction could come from piping manufacturer's rules or recommendations. For example:

Install a minimum 18 inches of metallic or other approved material piping between water heater and PEX tubing.

from the TUBING INSTALLATION PRACTICES section of INSTALLATION HANDBOOK: Cross-linked Polyethylene (PEX) Hot and Cold Water-Distribution Systems of the Plastic Pipe and Fittings Association.


Pre-assembled copper right angle extensions do exist. If you can't get your hands on one, a plumber could assemble one for you. It's just a 3/4 FIP to a short piece of copper pipe, to an eblow, to 18 inches of copper pipe. It might even end up being SHORTER than what you have now.


Did it explicitly say copper? I have used flex line from PEX to the water heater. They come in 18” or 24” length some with a shut off valve. I assumed it met that requirement.

  • My plumber specifically told me that flex line is only allowed temporarily. For a permanent fix, rigid pipe is required to meet the plumbing code. Of course, this might be different in my jurisdiction than yours.
    – mdfst13
    Commented Mar 23 at 14:10

Use 18" copper flex line, sweat a PEX starter to it. Bend it in a loop if you have to. Don't make it difficult.

  • Hello, and welcome to Home Improvement. Thanks for the answer; keep 'em coming. And, you should probably take our tour so you'll know how best to contribute here. Commented Feb 20, 2020 at 18:55

Well first of all if you can get pex plumbed to it which is wrong you can sweat and plumb it in copper. Which is the most reliable and best way. But yeah you can use those cheap ass flex hoses but even then seems like a hack job. But it was already done by a clueless home owner it looks like or meth head wannabe plumber. I assume no expansion tank as well on it. The reason for the code requiring 18” of hard piping is because the water lines get very hot coming right outside the tank almost always hot even when not using water. So it wears on soft piping and makes it lose its shape and durability. That’s why heaters with copper sweated on even plumbed in pex don’t get leaks on the top within a couple years can last 50+ years if you have good quality water in your area.


that's an electric water heater. pex is fine. the 18inches of metal/ copper is for gas fire water hearts at the EXHAUST gets VERY HOT. an electric heater only gets as hot as the water does...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.