Water Heater Code Requirements: What a Compliant Install Needs
Water heater code requirements cover the safety parts an inspector checks on any install: a temperature-and-pressure (T&P) relief valve with a proper discharge pipe, a thermal expansion tank on closed systems, a drip pan where a leak could damage the building, seismic strapping in earthquake zones, correct venting and combustion air, working clearances, and a pulled permit. Most rules trace to the IPC or UPC, but the details vary by state and local code.
What a code-compliant water heater install needs
A compliant install has to satisfy the plumbing code your jurisdiction adopted, either the International Plumbing Code (IPC) or the Uniform Plumbing Code (UPC), plus any local amendments. The core list is short and consistent: relieve pressure safely, absorb thermal expansion, contain leaks, secure the tank where earthquakes are a risk, vent combustion byproducts, and get it inspected. The table below maps each requirement to when it applies.
| Requirement | What it is | When it’s required |
|---|---|---|
| T&P relief valve | A combination temperature-and-pressure valve that opens if the tank exceeds about 210°F or 150 psi | Always, on every tank water heater |
| T&P discharge pipe | A gravity drain line from the valve to an approved termination, no threads or cap at the end | Always, wherever a T&P valve exists |
| Thermal expansion tank | A small tank that absorbs pressure as heated water expands | On closed systems (check valve, PRV, or backflow preventer present) |
| Drip / drain pan | A metal or plastic pan under the heater with a drain line | Where a leak could damage the building, such as an attic or over living space |
| Seismic strapping | Two straps anchoring the tank to framing | In seismic zones (CA, WA, OR and similar); rarely elsewhere |
| Venting | Flue or direct-vent piping that carries combustion gases outside | On all gas and other fuel-burning heaters |
| Combustion air | Adequate fresh-air supply for the burner | On gas heaters, sized to the space and BTU input |
| Ignition-source elevation | Burner/ignition raised above the floor in a garage | Gas heaters in a garage, unless the unit is FVIR-listed |
| Working clearances | Access space and a 22 x 30 inch minimum opening to service or remove the unit | Always, so the heater can be inspected and replaced |
| Permit and inspection | A pulled permit and passed inspection | In most jurisdictions, for install or replacement |
Treat this as the baseline. Your inspector answers to the exact edition of the code your city adopted, and local amendments can add or relax items. The rest of this guide breaks down each one, with the numbers inspectors actually measure. For the dollars behind these parts, see what a water heater replacement costs.
The water heater compliance checklist
Use this ordered checklist to walk a new or replacement install before you call for inspection. It follows the same sequence a plumber works in, from the valve at the top of the tank down to the permit paperwork. Items marked conditional only apply in certain homes or regions, so confirm which ones your setup triggers.
- T&P relief valve installed in the dedicated port and rated for the tank.
- Discharge pipe run full size, by gravity, downward, ending 6 inches or less above the floor or receptor, with no threads or cap at the end.
- Thermal expansion tank fitted on the cold supply if the home is a closed system (conditional).
- Drip pan under the heater with a drain line where a leak could cause damage (conditional).
- Two seismic straps in the upper and lower third of the tank in earthquake regions (conditional).
- Venting sized and pitched correctly, with no back-drafting, on fuel-burning units.
- Combustion air openings or ducts adequate for the burner (gas units).
- Ignition source at least 18 inches above the floor if the gas unit sits in a garage (conditional).
- Shutoff valve on the cold inlet and correct dielectric or approved connectors.
- Working clearance and a 22 x 30 inch access opening maintained.
- Permit pulled and inspection scheduled before the job closes.
Skipping the conditional items is the usual reason a “finished” job fails. An inspector who finds no expansion tank on a closed system, or a capped discharge pipe, will red-tag the install until it is corrected.
Thermal expansion tank: the closed-system rule
An expansion tank is required in many areas whenever the home is a closed system, meaning a check valve, pressure-reducing valve (PRV), or backflow preventer sits between the water heater and the city main. Both major codes call for it: IPC Section 607.3 and UPC Section 608.3. Without somewhere to go, water expanding as it heats spikes the pressure and stresses the tank, valves, and the T&P.
The trigger is the closed system, not the heater itself. As municipalities add backflow protection and PRVs, more homes become closed systems by default, which is why expansion tanks show up on so many replacement quotes now. One code difference matters: the UPC applies “independent of the type of water heater,” so many UPC areas want a tank even on tankless, while the IPC language points at storage water heaters and may exempt a standalone tankless. Confirm with your inspector.
| Static supply pressure | Typical expansion tank for a 50-gallon heater |
|---|---|
| 40 to 70 psi | About a 2-gallon tank |
| Around 80 psi | Roughly a 5-gallon tank |
Sizing follows the manufacturer, and it depends on tank capacity and incoming pressure. Both codes cap static pressure at 80 psi (IPC 604.8, UPC 608.2) and require a PRV above that, which then creates the closed system that requires the expansion tank. The tank also has to be pre-charged to match your home’s pressure, or it will not do its job.
T&P relief valve and discharge pipe
Every tank water heater must have a combination temperature-and-pressure relief valve, and it must drain through a discharge pipe run to code. The T&P is the last line of defense against a tank rupturing, so inspectors are strict here. Federal and state safety codes have required T&P valves for decades, and a missing, capped, or blocked discharge line is one of the most common violations.
The discharge pipe carries the exact rules people trip over. The specifics below reflect standard IPC and UPC language, but always defer to your local edition.
- Size: not smaller than the valve outlet, typically 3/4 inch, and full size the whole run to the air gap.
- Direction: flows by gravity and points downward at the end.
- Termination: ends not more than 6 inches above the floor or receptor, and not less than two pipe diameters above it.
- No cap or threads: the end cannot be threaded, capped, or plugged, so it can never be sealed shut.
- Single device: serves only that one T&P valve, not tied into other drains.
- Visible: terminates somewhere an occupant would notice it discharging, to an approved location or the outside.
The logic is simple: if the valve blows, hot water has to escape safely and someone has to be able to tell it happened. A capped line turns a safety valve into a sealed pressure vessel, which is exactly the failure the code exists to prevent.
Drip pan and drain line
A drip pan under the water heater is required in many areas wherever a leak could damage the building, such as an attic, a closet over living space, or a finished floor. The pan catches slow leaks and condensate and routes them away before they rot framing or ruin a ceiling. Where the heater sits in an unfinished garage or basement with a floor drain, some jurisdictions do not require one.
When a pan is required, the common code spec is a pan at least 1.5 inches deep, sized to fit under the tank, drained by an indirect waste pipe of not less than 3/4 inch diameter that runs to an approved point of disposal. The drain has to go somewhere useful, not just puddle nearby, or it defeats the purpose. Local rules set the termination point, so check where yours must discharge.
Seismic strapping: where it’s required
Seismic strapping is required in earthquake-prone states, chiefly California, Washington, and Oregon, and rarely required elsewhere. The straps keep the tank from toppling in a quake, which prevents gas-line breaks, water damage, and fire. In California it is law under Health and Safety Code Section 19211 and CPC 507.2, covering new, replacement, and existing residential water heaters.
Where it applies, the standard is two straps: one in the upper third of the tank and one in the lower third, anchored into framing. In California the lower strap must sit at least 4 inches above the tank’s controls. The UPC uses the same upper-third and lower-third rule, and some jurisdictions add a third or fourth strap for larger tanks up to 100 gallons. Outside seismic regions, most codes do not require strapping at all, though it is cheap insurance.
Venting, combustion air, and clearances
Gas and other fuel-burning water heaters must vent combustion gases outside and draw enough combustion air, and every heater needs working clearance for service. Undersized or corroded venting is a top violation because it risks carbon monoxide back-drafting into the home, a life-safety issue, not a paperwork one.
The key items an inspector checks:
- Venting: the flue or direct-vent piping must be the right diameter, pitched upward, and sealed, with no signs of back-drafting or spillage at the draft hood.
- Combustion air: the space must supply enough fresh air for the burner’s BTU input, often through openings or ducts on confined spaces.
- Ignition-source elevation: in a garage, the ignition source must sit at least 18 inches above the floor, unless the unit is listed as flammable-vapor-ignition-resistant (FVIR).
- Clearances and access: the heater needs manufacturer-specified clearances to combustibles and an access opening of at least 22 by 30 inches, large enough to remove the unit.
If you are replacing a gas unit with a more efficient model, venting can change entirely, since some newer heaters vent differently. That interacts with the newer efficiency rules covered in the 2026 water heater efficiency standards, so confirm the vent design before you buy.
When a permit applies
In most jurisdictions a plumbing permit is required to install or replace a water heater, and it often runs $25 to $300 depending on your city or county. The permit is not busywork: it triggers the inspection that verifies the T&P discharge, expansion tank, drip pan, venting, and strapping are all correct. An unpermitted heater can also surface as a problem when you sell the home.
Who can pull the permit varies. Some areas let a homeowner permit and install their own water heater, while others require a licensed plumber for gas work or any permitted job. Gas connections, venting, and combustion air carry real safety risk, so many homeowners hire out even where DIY is allowed. For the wider picture on which jobs need paperwork, see when a plumbing permit is required, and if you would rather not chase code details yourself, find a licensed local plumber who pulls the permit under their license.
The through-line on all of this: the codes set a floor, your local jurisdiction sets the specifics, and the inspection is where it gets checked. When a quote or a DIY plan skips the expansion tank, the discharge pipe rules, or the permit, it is skipping the exact items that fail inspection. Build to the checklist above and confirm the conditional pieces with your own building department.
Frequently asked questions
Is an expansion tank required by code on a water heater?
In many areas yes, if you have a closed system. Both the IPC (Section 607.3) and UPC (Section 608.3) require thermal expansion control when a check valve, pressure-reducing valve, or backflow preventer sits between the water heater and the city main. If your home has any of those, an expansion tank or approved device is usually required.
Where does a water heater T&P discharge pipe have to end?
The discharge pipe must run full size by gravity and end no more than 6 inches above the floor or receptor, and not less than two pipe diameters above it, pointing downward. The end cannot be threaded or capped, and it must discharge to an approved location where a person would notice it releasing. Exact rules follow your local code.
Are water heater seismic straps required by code?
In seismic states like California, Washington, and Oregon, yes. California requires two straps, one in the upper third and one in the lower third of the tank, with the lower strap at least 4 inches above the controls, under Health and Safety Code 19211 and CPC 507.2. Most of the country outside seismic zones does not require strapping.
Do you need a permit to install a water heater?
In most jurisdictions yes, a plumbing permit is required to install or replace a water heater, and it often runs $25 to $300. The permit triggers an inspection that checks the T&P valve and discharge, expansion tank, drip pan, venting, and strapping. Whether a homeowner can pull it or only a licensed plumber varies by area.
Does a tankless water heater need an expansion tank?
Sometimes. The UPC requires thermal expansion control on any heater type in a closed system, so many UPC areas want a tank on tankless too. The IPC language points at storage water heaters, so a standalone tankless without a storage tank may be exempt in IPC areas. Because interpretations differ, confirm with your local inspector.
Last reviewed: August 2026.