Local jurisdictions are responsible for creating and enforcing building rules for decks. All these jurisdictions base their codes either directly or with some changes on the International Residential Code, which was created and is continuously updated by the International Code Council, a nonprofit organization. Deck installers who ignore these mandates will not have their constructions approved by building inspectors. Unapproved decks may not legally be used, and may not be transfered to new owners if the homes containing them are sold.
The IRC puts guardrails for decks at a minimum height of 36 inches. The height of supporting posts and decorative slats must take into account the thickness of the rail. For example, a 2-inch-thick guardrail requires a minimum 34-inch post. The supporting structures may take any patterns, but must not have any openings big enough to pass a 4-inch-diameter sphere. This protects small children from getting caught between slats, since their heads are about the size of the sphere.
The IRC states that for steps leading to the surface of the deck, a handrail is needed on at least one side of the stairway if it contains four or more risers. The stair rails must be between 34 and 38 inches high as measured from the sloped plain next to the tread nosings, or from the adjacent ramp. If the rail has a circular cross section, it must have an outside diameter of between 1.25 and 2 inches. If it is not circular, the perimeter dimension must be between 4 and 6.25 inches, with a maximum cross section of 2.25 inches. As with deck rails, posts or balusters for stairs must account for the thickness of the rail, and be spaced so that a 4-inch-diameter sphere cannot go through.
The IRC states that whatever the ultimate height of the guardrail, it must be strong enough to withstand concentrated pressure of 200 pounds at any point along the rail. This requires that support posts be spaced by no more than 6 feet. It also mandates that these posts are attached to the support structure of the deck, and not just to the surface boards. The North American Deck and Railing Association reports that in December 2003, a guardrail that had used support posts attached to the deck surface failed, causing a woman to fall 14 feet to her death.