banner titled can pex be connected to a water heater

Can PEX Be Connected to a Water Heater?

Written by: Mark Ligon

|

Published on

|

Time to read 7 min

PEX piping is quickly becoming one of the most popular types of plumbing pipes in the United States. Despite its plastic composition, PEX tubing is flexible, malleable, easy to install, and shockingly durable. Because of its ease of installation and durability, many plumbers are wondering if they can connect PEX directly to a water heater.


Local building codes typically prohibit connecting PEX directly to a water heater. You can use PEX for the hot and cold water runs leading up to the water heater, but it can't be directly connected to the water heater itself if the code prohibits it. Instead, you typically need to use copper or flexible connectors specifically designed for water heaters.


Whether you can connect PEX directly to a water heater depends on your local building code and the type of water heater you're using. Most codes prohibit this, but not all. However, even if your local building code doesn't prohibit connecting PEX pipe to a water heater, it still might not be the best option. This article will examine whether it's a good idea and some alternatives if PEX isn't an option. 

What Exactly is PEX Piping?

PEX stands for cross-linked polyethylene, and it's made of high-density polymer polyethylene. PEX is hard and durable while maintaining flexibility because the polyethylene polymers are permanently cross-linked together. This is done through a chemical process that changes the high-density polyethylene into a thermoset rather than a thermoplastic.


These chemical and physical changes to the polyethylene turn it into PEX and give it the hard, flexible outer shell that PEX is famous for. These changes also make PEX tubing stronger, more durable, and more resistant to high and low temperatures. As such, it's the perfect type of tubing for plumbing applications in residential and commercial settings.

plumber arranging wires in wall of residential home

Benefits of PEX Over Other Types of Pipe

In addition to its outstanding physical characteristics, here are some of the reasons plumbers prefer PEX over other materials:

Better for Bends and Turns

With copper, metal, PVC, and other types of rigid piping, you need a ton of fittings to go around bends and turns. However, while PEX fittings are available and easy to install, you don't always need to use them. Depending on the situation, you can simply bend the PEX tubing to meet your needs and skip fittings altogether.

Easy Installation

PEX is by far the easiest type of piping system to install. You simply unroll the tube and take it to wherever you need to go. Because PEX is light, you also don't need as many hangers and supports as other pipes.

Cost Effective

PEX piping is cheaper than other piping systems for two reasons. First, the cost of a roll of PEX is less than that of PVC, copper, and other types of pipe for cold and hot water systems. Second, PEX is extremely easy to install and requires fewer fittings, which means less money spent on installation.

Corrosion Resistant

Unlike copper and metal, PEX has no metal components and is 100% corrosion-resistant. PEX also holds up well against UV light if that's a factor in your area.

Great in All Temperatures

Because of its internal composition, PEX can withstand hot and cold temperatures, from freezing to 200 degrees Fahrenheit. This far exceeds most potable water systems, which means PEX is safe to use anywhere.

Is PEX Compatible With Water Heaters?

As with most plumbing questions, whether or not PEX is compatible with water heaters isn't a yes and no question. Instead, it depends on the following factors:

Type of PEX Your Using

Because of how popular PEX has become, many manufacturers now produce it. Some types of PEX are better and more durable than others, so it's important to know what type of PEX you're using. PEX A, for instance, is the best type of PEX for hot water situations.

Local Building Code

As we said before, your local building code is a huge factor. If you follow the Uniform Plumbing Code, you can't connect PEX directly to a water heater. However, if you follow the International Plumbing Code, you simply have to adhere to the PEX and water heater manufacturer's instructions.

Types of Hot Water Heater and Tank

Lastly, the type of domestic hot water heater you have will also affect whether or not you can use PEX. As long as your local plumbing code doesn't prevent it, it's perfectly fine to connect PEX to an electric water heater.


However, even if the local building code says it's okay, you shouldn't connect PEX directly to a gas water heater. The flue gas that emanates off of the vent pipe can melt PEX, resulting in a catastrophic leak. As such, keeping any PEX tubing at least 6" away from the vent pipe is essential.

Materials Needed to Connect PEX to a Water Heater

If you've checked your local building code and it's okay to connect PEX tubing directly to a water heater, here's what you'll need:


• 3/4" PEX expansion crimpers, as 3/4" is the standard size requirement for a pipe-to-water heater connection
• PEX A expansion fittings
Shutoff valve
• Flexible water heater connectors (optional)

materials on table needed to connect pex to water heater

How to Connect PEX to a Water Heater

Once you have all your tools and materials, you're ready to make your connection.


  1. Set the hot water heater in place.
  2. Measure the distance from the top of the water heater to your hot and cold supply pipes.
  3. Cut your PEX pipe to match the measurements.
  4. On the hot water side, connect PEX directly to the union connector on top of the water heater.
  5. For the cold water side, install a shutoff valve 6-16" above where you connect the PEX directly to the union connector on the water heater.

Even if you have the option of connecting PEX directly to your water heater, it's easier to use flexible water heater connectors. This allows you to easily attach and detach the connection as needed, if you ever need to replace the electric heater.

plumber connecting pex to the water heater

Mistakes to Avoid When Connecting PEX to a Water Heater

The biggest mistake to avoid with PEX and water heaters is connecting PEX directly to a gas water heater. You also shouldn't connect directly to tankless water heaters, as they have a higher operating temperature and require copper or metal pipe. Additionally, if you use PEX in the run up to a gas water heater, keep the PEX at least 6" from the vent pipe to keep it from overheating. 

Check Local Building Codes First: Most plumbing codes (such as the Uniform Plumbing Code) prohibit connecting PEX directly to a water heater. In many cases, you must use copper or specialized flexible connectors for the first 18 inches of the connection.

Avoid Gas Water Heater Connections: You should never connect PEX directly to a gas water heater. The heat from the exhaust vent/flue can melt the plastic tubing; PEX must be kept at least 6 inches away from any gas vent pipe to prevent failure.

Electric Heater Compatibility: If local codes allow, PEX can often be connected directly to electric water heaters using 3/4" expansion fittings, as they do not have the same external heat/venting issues as gas models.

Installation Best Practices: For any water heater setup, it is recommended to use a shutoff valve on the cold water side (6–16 inches above the heater) and consider flexible water heater connectors for easier maintenance and future replacements.

FAQs

Can I connect PEX pipe directly to a gas water heater?

No. You should never connect PEX directly to a gas water heater. The flue gas from the vent pipe can reach high temperatures that may melt the PEX, leading to leaks or pipe failure. It is essential to keep PEX tubing at least 6 inches away from the vent pipe, typically using copper or flexible metal connectors for the initial connection.

Is it legal to connect PEX directly to a water heater?

It depends on your local building codes. Many local codes, especially those following the Uniform Plumbing Code (UPC), prohibit direct connections and require a certain length of metallic pipe (usually 18 inches) before transitioning to PEX. However, the International Plumbing Code (IPC) generally allows it if you follow the manufacturer's specific instructions. Always check your local regulations first.

Can PEX be used with electric water heaters?

Yes, provided your local building codes allow it. Because electric water heaters do not have a hot exhaust vent like gas heaters, the risk of melting the pipe is significantly lower. However, many professionals still prefer using a flexible water heater connector to make future maintenance or replacements easier.

What type of PEX is best for hot water applications?

PEX-A is generally considered the best choice for hot water lines and water heater connections. It is the most flexible type of PEX and has a high resistance to temperature and pressure, making it ideal for the thermal expansion that occurs near a water heater.

mark ligon headshot

Mark Ligon

Mark Ligon is the marketing manager at PVC Fittings Online, a supplier of commercial PVC and CPVC pipe, fittings and valves. Ligon enjoys educating businesses on the parts of piping systems so managers can make informed decisions. He can be reached at webmaster@commercial-industrial-supply.com.

Related Blogs