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.