DeckNear

DeckNear is a free referral service. We are not a contractor. When you call, you are connected to an independent local provider who may pay us for the referral. Providers are responsible for their own licensing, pricing and work.

How to choose deck railing that meets code

Request a free quote

Tell us your city and project, and we will point you to an independent local provider.

The short answer first

Choose the railing as a safety system, not as trim. First confirm whether your deck needs a guard at all, then check three things in order: guard height, the strength of the post connection into the framing, and the size of the openings in the infill. Style comes last.

Guard and handrail do different jobs

People use the word railing for both parts, but a guard and a handrail do different jobs. A guard is a barrier along an open edge. Its job is to stop a person from falling off a raised surface or down the open side of a stair. A handrail is something you grip. Its job is to give your hand steady support while you climb or go down stairs.

Some stair rails do both jobs at once, when the top of the guard is shaped and placed so a hand can grip it. A wide flat cap rail can work well as a guard top, but it is hard to grip. Keep the two jobs separate when you shop, because the code treats height and placement for each job in its own way.

When a guard is required

The trigger is height above the surface below. The International Residential Code text on guards says porches, balconies or raised floor surfaces more than 30 inches above the floor or grade below shall have guards not less than 36 inches in height. The same section says open sides of stairs with a total rise of more than 30 inches shall have guards not less than 34 inches, measured vertically from the nosing of the treads.

Measure to the grade or floor below the edge, not to a planter or bench that happens to sit there. On sloped ground, measure at the low point near the edge, where a fall is longest.

Height rules for the deck and the stairs

Height is where most home built rails go wrong, often by a small margin. The 2021 IRC guard section, shown with Rhode Island amendments, says required guards at open sided walking surfaces, including stairs, porches, balconies or landings, shall be not less than 36 inches high, measured above the adjacent walking surface or the line connecting the nosings. Where the top of the guard serves as a handrail on stairs, it shall be 34 to 38 inches.

On the flat deck, measure straight up from the walking surface to the top of the guard. On stairs, measure from the line that connects the tread nosings. A rail that is tall enough on the flat section can still come up short on the stair run if it was measured from a single tread instead.

Why post attachment matters more than looks

A guard is only as strong as its posts, and posts are only as strong as their connection to the frame. The American Wood Council guide to DCA 6 deck design notes that guards and handrails must resist a minimum concentrated live load of 200 pounds applied in any direction. That is roughly one person leaning or falling hard against the top rail, all in one spot.

Screws into a deck board cannot carry that load for long. Posts need to connect into the joists or blocking below, with hardware that suits the assembly. The same guide notes that guard post connections in DCA 6 reflect laboratory tested assemblies, and that a hold down connector of at least 1800 pounds capacity is specified for a 36 inch rail height. A higher rail needs a higher capacity connector designed for it. If you are planning a deck building project, put the post connection detail on the drawing. During a deck replacement, sound looking posts can hide weak fixings, so check the connection, not just the surface.

Infill choices and how each one is checked

Infill is the part between the posts, and each type is checked in its own way. Vertical balusters are the classic choice. They are checked for even spacing, firm fixing at top and bottom, and no cracked or loose pieces. Spacing must stay consistent at the stair angle too, where gaps can open up if balusters are set without care.

Panels, in glass, metal mesh or composite, spread the load across a wider area and leave fewer gaps. They are checked at their edges and fixings: the panel must sit securely in its frame or clamps, with no movement that could work it loose. Cable systems use horizontal stainless cables. They are checked for tension, because a slack cable can deflect and let an opening grow when a child pushes on it.

Openings, children and the local code check

Openings are the child safety part of the guard, and they deserve care rather than a rule of thumb. Openings need to be small enough to meet the locally adopted code where you live. Editions and amendments differ, so this post does not state one opening size as if it applied everywhere. Local amendments vary, and the permit office has the final word. Ask your building department which code edition and local amendments apply to guard openings, get the requirement in writing with your permit, and build and measure to that exact figure.

Check openings where they tend to grow: the gap under the bottom rail, the triangle formed by a stair tread, riser and bottom rail, and the space beside the first and last post. Furniture matters too. A bench or storage box against a guard gives a child a step up, which shortens the effective height. Keep climbable items away from the rail. See the towns served on our areas we cover page.

Frequently asked questions

When is a guard required on a deck?

A guard is required when a porch, balcony or raised floor surface sits more than 30 inches above the floor or grade below it, under the cited code text. Open sided stairs with a total rise of more than 30 inches also need a guard. Your town may adopt a different edition or amendment, so confirm the trigger height with the permit office before building.

How high should a deck guard and stair guard be?

The cited code sets guards at not less than 36 inches high for open sided walking surfaces, measured above the walking surface or the line connecting the stair nosings. Where the top of a stair guard also serves as a handrail, that top rail should sit between 34 and 38 inches. Measure from the correct point, because a few inches change the result.

How strong does a deck guard need to be?

Guards and handrails must resist a minimum concentrated live load of 200 pounds applied in any direction, under the design guidance cited in this post. That load is why posts must connect into the deck framing with tested hardware, not only into deck boards. A taller guard needs a connector with higher capacity, matched to the rail height and the tested assembly.

How are guard openings checked for child safety?

Openings in a guard need to be small enough to meet the code your town has adopted, and that detail is not set by looks alone. Balusters, panels and cable systems are each checked in a different way, from spacing to tension and fixing strength. Ask the building department which edition and amendments apply, then build and measure to that exact requirement before inspection.

Sources

Common questions

When is a guard required on a deck?

A guard is required when a porch, balcony or raised floor surface sits more than 30 inches above the floor or grade below it, under the cited code text. Open sided stairs with a total rise of more than 30 inches also need a guard. Your town may adopt a different edition or amendment, so confirm the trigger height with the permit office before building.

How high should a deck guard and stair guard be?

The cited code sets guards at not less than 36 inches high for open sided walking surfaces, measured above the walking surface or the line connecting the stair nosings. Where the top of a stair guard also serves as a handrail, that top rail should sit between 34 and 38 inches. Measure from the correct point, because a few inches change the result.

How strong does a deck guard need to be?

Guards and handrails must resist a minimum concentrated live load of 200 pounds applied in any direction, under the design guidance cited in this post. That load is why posts must connect into the deck framing with tested hardware, not only into deck boards. A taller guard needs a connector with higher capacity, matched to the rail height and the tested assembly.

How are guard openings checked for child safety?

Openings in a guard need to be small enough to meet the code your town has adopted, and that detail is not set by looks alone. Balusters, panels and cable systems are each checked in a different way, from spacing to tension and fixing strength. Ask the building department which edition and amendments apply, then build and measure to that exact requirement before inspection.

Last checked: 2026-11-02