What Is a Guardrail? Deck and Stair Guard Rules

The railing that keeps people from falling off a deck, balcony or open stair, and a frequent inspection item.

Updated November 2026 Glossary Term

Guardrail: A barrier along an open-sided walking surface, such as a deck, balcony or stair landing, built to a required height and strength so people do not fall from it. Model codes call it a guard.

What a Guardrail Is

A guardrail, called a guard in the model codes, is the barrier along the open edge of a deck, porch, balcony, landing or stair. It is different from a handrail, which is something to hold while walking. A guard must be tall enough, strong enough and close enough in its spacing that a person or small child cannot fall or slip through.

Guards are one of the most inspected parts of a deck, because they fail from loose posts and weak connections.

Guards also apply to the open sides of stairs and to raised landings, balconies and porches, not only decks.

Common Model Code Rules

Under the International Residential Code, guards are generally required where the walking surface is more than 30 inches above the ground below, and the common height for a deck guard is 36 inches. Openings must be small enough that a 4 inch sphere cannot pass through, and the guard must resist a specified load pushed against its top. Stair guards often have a different height than deck guards.

These are model code figures. Local adoption varies, and some cities set a different height or add rules for tall drops, so use your city's handout.

Cable or glass infill is allowed in many places if it meets the same spacing and load rules.

What Inspectors Look For

At the final inspection, inspectors push on the posts and top rail to test strength, measure the height and check the gaps between balusters. They check that posts attach to the structure with the right hardware and not just screws into the decking. Gaps under the bottom rail and at stair angles are also common failures.

Guards also come up on stairs, balconies and landings, and they must continue around the openings.

A wobbly post is the most common failure, and it is fixed by adding blocking or hardware to attach the post to the framing.

Where Guardrails Come Up on This Site

Guards are central to deck permits. The deck permit thresholds research compares height lines that cities use, and the deck permit guide shows what a deck review covers. Nearly every deck that needs a permit must show its guard on the plans.

Even a deck that does not need a permit may still be subject to guard rules enforced if the deck is later inspected.

If your deck is permitted, expect the guard height, post attachment and baluster spacing to be listed in a plan review comment or checklist. Guard details are among the first things a reviewer asks for because they decide whether a finished deck is safe to use.

Frequently Asked Questions

The International Residential Code commonly sets 36 inches for a deck guard, and requires guards where the drop is more than 30 inches. Local adoption varies, and some cities differ, so confirm the height and the drop that trigger the guard rule with your permit office.
No. A guardrail stops people from falling off an open side, while a handrail is something you hold while using stairs or ramps. A stair often needs both, and each has its own height and strength rules. The permit plan should show both.
It depends on the city. Some cities treat a like-for-like railing repair as maintenance, while others require a permit when you change the guard or when the deck is already permitted. Our deck research compares city rules, and the permit office can confirm for your deck.
Stay up to date
Get notified when we add new cities or update permit fees.