Codes7 min readFloorGen team
Water Heater Location Code: Garages, Closets, Clearances
Water heater installation code (2021 IRC): the 18 in garage rule, impact protection, bedroom and closet limits, pans, drains, straps, 30 in space.
Under the 2021 IRC, a water heater in a garage must have its burner or other ignition source at least 18 in above the floor (unless it is listed as flammable-vapor-ignition resistant) and must be protected from vehicle impact. A gas or other fuel-fired heater is barred from a storage closet (the gas chapter allows a direct-vent one there; see below), and one in a bedroom or bathroom must be direct-vent or in a sealed enclosure. Every location also needs a 30 in deep by 30 in wide working space in front of the controls.
This guide goes through those rules, then the pan, drain and seismic-strap rules, and shows where a heater can go on two FloorGen plans: a ranch with the heater in the garage, and a finished basement with a mechanical room.
The rules at a glance
Water heater rules are spread over four parts of the 2021 IRC: Chapter 13 (general mechanical), Chapter 20 (water heaters in the mechanical volume), Chapter 24 (fuel gas) and Chapter 28 (plumbing). Where a rule is written in more than one chapter, the numbers below give both.
| Topic | Rule | 2021 IRC |
|---|---|---|
| Garage height | Ignition source 18 in above floor | M1307.3, G2408.2, P2801.7 |
| Vehicle damage | Approved barrier, or out of harm's way | M1307.3.1, G2408.3 |
| Storage closet | No fuel-fired heater (gas: direct-vent allowed) | M2005.2, G2406.2 |
| Bedroom or bath | Direct-vent or sealed enclosure | M2005.2, G2406.2 |
| Working space | 30 in deep by 30 in wide | M1305.1 |
| Pan | Required if a leak would cause damage | P2801.6 |
| Seismic straps | Upper and lower thirds, in high-seismic areas | M1307.2, P2801.8 |
These are 2021 IRC numbers (mechanical, fuel gas and plumbing chapters); check them in the edition your jurisdiction uses. Most states and cities amend these chapters, and some adopt an older IRC.
Water heaters in the garage
A garage is where gasoline vapour can collect near the floor. The code therefore wants any appliance with an ignition source raised so that source is at least 18 in above the garage floor (2021 IRC M1307.3 for mechanical, G2408.2 for gas, and P2801.7 in the water heater chapter, which carry the same exemption for flammable-vapor-ignition-resistant heaters). Rooms that are not living space but open into a private garage through an opening are treated as part of the garage.
The 18 in is measured to the burner, pilot or other ignition source, not to the bottom of the tank. Most people build a stand so a 40 or 50 gallon tank sits high enough. Heaters listed as flammable-vapor-ignition resistant (FVIR) are exempt from the elevation. Check the label. Electric heaters have no flame, and how inspectors treat their elements and thermostats varies by jurisdiction, so ask your building department before you leave one on the slab.
Protect it from the car
Elevation does not protect against a bumper. The 2021 IRC says appliances must not be installed where vehicles could damage them unless approved barriers are in place (M1307.3.1), and the fuel gas chapter adds that an appliance in a private garage needs 6 ft of clearance above the floor unless it is protected from impact (G2408.3). In practice that means a corner away from the vehicle path, behind a bollard (concrete-filled steel pipe is the usual approach) or a wheel stop, or inside a protected enclosure. Ask the inspector which they accept.
The ranch below has a 22 by 24 ft two-car garage (507 ft² net). The heater, drawn on an 18 in stand, sits in the north-east corner beside the overhead door, clear of both car bays. For sizes and door options, and the fire rules for the wall and door between garage and house, see garage dimensions and garage fire separation.

If you are turning the garage into living space, the heater usually moves with it. The same gas and ignition-source rules follow the appliance into the new room; see garage conversion floor plans.
Closets, bedrooms and bathrooms
These limits apply to fuel-fired heaters (gas, oil, propane). They are about combustion air and carbon monoxide, so an electric tank is not caught by them.
- Storage closet: the mechanical chapter bars a fuel-fired water heater from a room used as a storage closet (2021 IRC M2005.2), while the gas chapter allows a direct-vent gas appliance there (G2406.2). Where the two differ, ask which one your inspector applies.
- Bedroom or bathroom: the heater must be in a sealed enclosure so combustion air is not drawn from the living space. Direct-vent heaters, which take all their air from outdoors, need no enclosure (M2005.2).
- Gas rule: the fuel gas chapter lists bedrooms, bathrooms, toilet rooms and storage closets as prohibited spaces, with exceptions for direct-vent appliances and for a room that opens only into a bedroom or bathroom, serves no other purpose, has a solid weather-stripped self-closing door and takes combustion air straight from outside (G2406.2).
The code gives no minimum closet size for a water heater. What decides the size is the manufacturer's clearances, the 30 in working space, a clear way in to reach it, and room to remove the largest appliance. Any home with a fuel-fired heater also needs carbon monoxide alarms, and a bedroom next door still has to meet the legal bedroom rules.
Clearances and working space
The 2021 IRC wants appliances placed so they can be inspected, serviced, repaired or replaced without removing permanent construction, other appliances or unrelated pipes and ducts. A level working space 30 in deep by 30 in wide must be in front of the control side (M1305.1), and the water heater chapter (P2801.4) likewise wants the heater placed where it can be observed, maintained, serviced and replaced. Combustible clearances come from the label on the heater, not from the code, so read the installation sheet before you frame the closet.
In a finished basement the mechanical room does this job. FloorGen's ranch with a finished basement puts a 108.8 ft² mechanical room next to an 87.5 ft² laundry, both off the 4 ft hall, so the furnace, tank and washer sit together and the gas, drain and vent lines stay in one zone. A room of about 10 by 12 ft (wall centrelines) leaves plenty of 30 in working space; most of the work is in keeping the door swing and any storage out of it. Other rooms on that plan are covered in finished basement floor plans, and the laundry next door is sized in laundry room dimensions.


Pans, drains and relief valves
A pan is required under a storage tank heater where a leak would cause damage (2021 IRC P2801.6). The pan must be galvanized steel, aluminum, plastic or another approved material (plastic under a gas heater has to meet flame-spread and smoke limits), and be at least 1½ in deep (P2801.6.1).
- Pan drain: an indirect waste pipe at least ¾ in in diameter, running full size to an indirect waste receptor or to the outside, ending 6 to 24 in above the ground (P2801.6.1, P2801.6.2). No pan drain is needed on a replacement heater if none was installed before.
- Relief valve discharge: the temperature-and-pressure valve pipe must drain by gravity through an air gap in the same room, not connect directly to a drain, not be trapped or valved, and end 2 to 6 in above the floor or receptor (P2804.6.1).
- Slab or finished floor: a basement with a floor drain next to the tank is the easy case. Otherwise plan a path for the drain line before you frame.
Seismic straps
In seismic design categories D0, D1 and D2, and for townhouses in category C, a water heater must be anchored or strapped against horizontal movement (2021 IRC M1307.2 and P2801.8). The straps go in the upper and lower thirds of the tank and are designed for a horizontal force of one-third of its operating weight, or the manufacturer's instructions are followed. Even where it is not required, strapping a tank on a raised stand is cheap insurance. Your local seismic category is on your building department's site.
Try it on a plan
Moving a heater is easier on paper. Draw the room, drop in a tank, and check that the door, the 30 in space and the drain all fit before anyone cuts a hole in a slab.
More from the blog

Plans5 min read
Finished Basement Floor Plans and Layout Ideas by Size
Codes6 min read
GFCI and AFCI Requirements by Room (NEC 2023)
Codes7 min read
Water Heater Location Code: Garages, Closets, Clearances