What you need to know right now about the deck railing height code:
- A deck guard must be at least 36 inches tall, and it’s required any time your deck’s edge sits more than 30 inches above grade.
- Minnesota follows the national 36-inch standard exactly; it doesn’t require the taller 42-inch rail some states (like California) do.
- Stair guards are shorter, just 34 inches minimum, measured from the line connecting the stair nosings.
- Every gap in the railing has to block a 4-inch sphere, with slightly looser rules for stairs and the triangular gap under them.
- A full railing replacement usually needs a permit, but code sets a floor, not a ceiling, so you’re always free to build taller.
Keep reading for the sloped-lot measurement rules, the cable railing nuance, and what to check if your existing railing might already be out of code.
What Is the Standard Deck Railing Height Code?
The standard deck railing height code requires guards to stand at least 36 inches tall, measured vertically from the decking surface to the top of the rail. This applies to any residential deck, porch, balcony, or landing where the walking surface sits more than 30 inches above the ground or the floor below it.
Building codes call this component a “guard,” not a railing, though most homeowners use the two words interchangeably. The distinction matters mainly when you’re pulling permits or reading inspection reports.
The 36-inch figure comes from the International Residential Code, the model code most U.S. jurisdictions build their own residential code from. Minnesota builds specifically from the 2020 Minnesota Residential Code, which incorporates the 2018 IRC with Minnesota’s own amendments. Section R312.1.2 sets the height requirement; a separate section, R312.1.1, sets the 30-inch trigger that decides whether a guard is required in the first place.
Thirty-six inches sounds like an arbitrary number until you picture it in practice. It sits roughly at hip height for most adults, tall enough to stop an accidental stumble but low enough not to block the view you built the deck for in the first place.
When Does My Deck Actually Need a Guard?

A guard is required any time the walking surface is more than 30 inches above grade or the floor below, measured at the edge of the open side. Below 30 inches, most jurisdictions don’t require one, though you’re still free to add a railing for peace of mind.
That 30-inch line gets measured vertically, straight down from the deck edge to whatever is beneath it: dirt, grass, a patio, or a lower deck.
How the 30-Inch Trigger Is Measured
Measure from the walking surface down to the grade or floor directly below that specific point on the deck’s edge, not from the tallest or shortest point of the yard. The model code frames this as any point within 36 inches horizontally of the open edge, which is why inspectors check multiple spots along a rail run rather than just one.
That distinction matters more than it sounds like it should.
What Happens on a Sloped Lot
A lot of West Metro backyards slope toward a walkout basement or a low spot in the yard. If one section of your deck edge sits 27 inches above the lawn and another sits 33 inches above a sloped drop-off, that second section needs a guard even if the rest of the deck doesn’t.
We see this most often on lake-adjacent lots and walkout properties around Minnetonka and Wayzata, where the grade can change by two feet or more across a single deck.
Does Minnesota Follow the National Code, or Something Different?
Minnesota follows the national 36-inch guard height without modification. The state adopted its own version of the residential code, Minnesota Rules Chapter 1309, and while it amends the 30-inch trigger language slightly, it leaves the 36-inch height requirement untouched.
Minnesota’s Office of the Revisor of Statutes publishes the amended rule directly. Minnesota’s version of the trigger rule reads more simply than the national model: guards are required for surfaces “located more than 30 inches measured vertically to the floor or grade below,” without the added horizontal-distance qualifier some other jurisdictions use to handle sloped edges. The state didn’t touch the height requirement itself, so 36 inches still applies statewide, from Golden Valley to Plymouth to Eden Prairie.
Not every state stops at 36 inches. California’s residential code sets its guard height at 42 inches instead of the national default, eliminating the shorter option almost everywhere in the state. Washington is a common source of confusion here: its baseline residential code stays at 36 inches, matching the national default. The 42-inch figure in Washington applies to commercial and multifamily buildings, not typical single-family decks, though a specific city could still layer on a stricter local amendment.
| Jurisdiction | Minimum Guard Height | Guard Required When Deck Is |
| National model code (2021 IRC) | 36 in. | More than 30 in. above grade |
| Minnesota (MN Rules, Chapter 1309) | 36 in. | More than 30 in. above grade |
| Minnesota, commercial | 42 in. | Varies by occupancy classification |
| California, residential | 42 in. | More than 30 in. above grade |
| Washington, residential | 36 in. | More than 30 in. above grade |
| Washington and most states, commercial or multifamily | 42 in. | Varies by occupancy classification |
Local building departments can add their own amendments on top of the state code, so it’s worth a quick call to your city if you’re building somewhere outside our usual service area.
What About Baluster Spacing and the 4-Inch Sphere Rule?
Baluster spacing has to stop a 4-inch sphere from passing through any gap in the railing, whether that gap sits between two balusters, under the bottom rail, or between a post and a baluster. On the open side of a stairway, that allowance grows slightly to 4-3/8 inches.
The sphere test exists for one reason: keeping a small child’s head or torso from slipping through the railing.
Cable railing systems get extra scrutiny here. Code still applies the same 4-inch sphere test to cable as to any other baluster, but cable has more give than a solid material. A well-engineered cable system typically spaces the individual wires tighter than 4 inches at installation, so the assembly still passes that same sphere test once someone leans on it and the cable flexes.
There’s a separate allowance for the triangular gap formed underneath a stair guard, where the riser, tread, and bottom rail meet. That gap is allowed to be larger, up to a 6-inch sphere, since it’s a much harder spot for a child to reach in the first place.
Weighing composite, cable, or aluminum for your new railing? Our guide walks through how each material holds up to Minnesota winters. Read How to Choose the Best Materials for Custom Deck Railing →
How Tall Does Deck Stair Railing Need to Be?
Stair guards have their own, shorter minimum: 34 inches, measured vertically from the line connecting the tips of the stair treads (the nosing line), not from the decking surface. If the top of that stair guard also functions as your handrail, the requirement shifts to a range: 34 to 38 inches.
That range exists because a handrail has a different job than a guard. A guard stops you from falling off the side. A handrail gives you something to grip while your feet are doing the harder work of navigating stairs, and that grip height needs to land somewhere your hand naturally falls.
| Application | Minimum Height | Measured From |
|---|---|---|
| Deck walking surface (open side) | 36 in. | Decking surface |
| Stair guard | 34 in. | Line connecting stair nosings |
| Stair guard also serving as handrail | 34–38 in. | Line connecting stair nosings |
| Baluster gap, deck field and stairs | Blocks a 4-in. sphere | Not applicable |
| Baluster gap, open side of stairs | Blocks a 4-3/8-in. sphere | Not applicable |
| Triangular gap under stair guard | Blocks a 6-in. sphere | Not applicable |
Stair guards trip up more DIY builds than flat-deck guards do, mostly because the math changes with every step. We measure from the nosing line on every stair run we build, not from a single point at the top or bottom, since the required height has to hold consistent along the entire slope.
Do I Need a Permit to Replace or Build a Deck Railing?
In most West Metro cities, yes. Any structural deck work attached to your home, including a full railing replacement, typically requires a permit, and an inspector will check guard height and baluster spacing before signing off.
A straightforward cosmetic swap, like replacing wood balusters with matching composite ones at the same height and spacing, sometimes falls outside permit requirements. A full railing rebuild, a height change, or any structural repair almost always needs one.
We handle the permitting and inspection process on every project we take on, so you’re not the one tracking down a city inspector or decoding a rejected application.
Not sure if your railing needs a permit or just a refresh? Our team can walk your specific deck through it.
Can I Have My Railing Taller Than Code Requires?

Yes. Code sets a floor, not a ceiling, and plenty of homeowners choose taller railings for reasons that have nothing to do with meeting minimum requirements.
A few common reasons we hear from West Metro clients:
- Privacy or wind blocking, especially on decks facing a neighbor’s yard or an open field
- A cocktail rail, a wide flat cap that doubles as a shelf for drinks or planters
- Peace of mind with young kids or pets, even on decks where a lower rail would technically pass inspection
- Matching an existing railing height on a multi-level deck, so the sightlines stay consistent from top to bottom
There’s no upside to going shorter than code allows. There’s a real design upside, sometimes, to going taller.
What Happens If My Existing Railing Doesn’t Meet Code?

An older railing that falls short of current code isn’t automatically illegal to keep as-is, but it becomes a real problem the moment you touch it: repair, replace a section, or convert the deck into a porch, and inspectors will typically require the whole railing to come up to current code.
Age is the bigger risk here, not just compliance. Decks built before bolted connections and corrosion-resistant hardware became standard practice can develop hidden weaknesses that have nothing to do with the height of the top rail. NADRA, the trade association for the deck and railing industry, has tracked deck collapse injuries for years and consistently found that the large majority of people on a deck when it fails end up hurt.
A quick self-check before you plan any work:
- Grab the top rail and push firmly side to side. It shouldn’t move.
- Check baluster spacing with a tape measure, not a guess. Four inches is tighter than it looks.
- Look for rust streaks or splitting wood at post connections, a common early sign of failing hardware.
Noticed some wobble or gaps that look too wide? We’ve rebuilt railings across the West Metro that were original to decks 20 years old. Read Deck Builder Minnesota: What West Metro Homeowners Should Know →
How Personal Pride Builds Code-Compliant Railings in the West Metro
We measure every guard height and baluster gap against current Minnesota code before a single post goes in, on new decks and railing replacements alike. That means checking the 30-inch trigger at every point along the edge, not just the highest or most obvious spot, especially on the sloped lots common around Minnetonka and Wayzata.
We’re proud to offer a 10-year labor warranty on all projects, which covers the workmanship behind your railing long after the last inspection sticker goes up.
Materials matter here too. We primarily install S.T.A.R. and Westbury aluminum railing systems, chosen for how well they hold up through a Minnesota freeze-thaw cycle without the sag or splinter issues that come with lower-grade hardware.
Ready to see what a code-compliant, properly built deck actually looks like? Browse the full range of decks we build across the West Metro. See Our Deck Services →
Frequently Asked Questions about Deck Railing Height Code
Is a 36-inch railing required on every deck?
Only if the deck’s walking surface sits more than 30 inches above the ground or the floor below it at any point along the open edge. Lower decks aren’t required to have a guard, though many homeowners add one anyway.
Does deck railing height code differ by city within Minnesota?
The 36-inch height requirement itself doesn’t change by city, since it comes from the state-adopted code. Individual cities can add their own amendments in other areas, like setbacks or permit requirements, so it’s still worth a quick check with your local building department.
What’s the difference between a guard and a handrail?
A guard is the full railing system that prevents falls off the edge of a deck or stairway. A handrail is specifically what you grip while walking on stairs. A stair guard can serve double duty as a handrail if it’s built to the 34 to 38-inch range.
Can I use cable railing and still meet code?
Yes. Code applies the same 4-inch sphere test to cable as it does to any other baluster material. Cable flexes under pressure, though, so a properly engineered system typically spaces the individual wires tighter than 4 inches at installation to guarantee it still passes that test under load.
Do I need an engineer to sign off on a taller-than-code railing?
Not usually for a standard height increase on a residential deck. Taller railings do carry more wind load and leverage, though, so it’s worth discussing post spacing and structural attachment with your builder before going much past 42 inches.
Code-Compliant on Paper Isn’t the Same as Built to Last
Getting the numbers right is only half the job. A railing that measures out correctly on paper still needs solid post connections, proper fastening, and materials built for Minnesota winters to actually hold up. If you’re planning a new deck or looking at a railing that’s due for a rebuild, we’d rather walk the details through with you before anything gets built than have you find out what’s wrong from an inspector.


