The short answer
We draw a 38 in guard on every deck higher than 30 in. That is our own choice: the taller of the 36 in a house deck rail gets under the IRC and the 38 in the CPSC gives for school-age kids. The gaps matter more than the height: never leave an opening of 3-1/2 to 9 in.
The short answer: we draw a 38 in guard above the deck on every deck higher than 30 in. That is our own decision, not a line quoted from a code. It is the taller of two numbers: the 36 in that the IRC sets for the guard on a house deck, and the 38 in that the CPSC1 gives for school-age children. One height covers both rulebooks, so you do not have to pick.
Height is the easy part, though. A child is far more likely to get stuck in a gap or to climb a rail than to topple over one that is an inch short. Most of this guide is about the gaps.
- 1U.S. Consumer Product Safety Commission Public Playground Safety Handbook, publication 325
- 2U.S. Consumer Product Safety Commission Safety Tips for Home Playground Equipment, publication 324
What the Rules Say About Treehouse Railing Height
None of these documents is a building code for a play fort. The IRC is written for houses and their decks. The CPSC1 publications are safety guidelines for home and public playgrounds. We read both and draw to the stricter figure. Here is each number with where it comes from.
| Source | What it says | Applies to |
|---|---|---|
| IRC R312.1.2 (text as adopted in Seattle) | Guard at least 36 in high | A house deck, as a model for ours |
| IRC R312.1.3 | A 4 in sphere must not pass through the guard | A house deck |
| CPSC Publication 324, home playgrounds | A guardrail on a platform from 30 in to 48 in, a barrier from 48 in to 72 in at least 27 in high | Backyard play equipment |
| CPSC Publication 325, Table 4 | Guard at least 38 in for school-age children (5 to 12), on platforms from 30 in to 48 in | Public playgrounds, used here as the stricter reference |
Why we use 38 in and not 36 in
The IRC figure is for people standing on a deck. The CPSC1 figure is for the children who will be running on it. On a play fort the second number is the one that fits the user, and the difference between the two is only 2 in. If you want to see how the guard sits against the deck, open the designer and look at the green and amber guard.
Why 30 in is the trigger
Both the IRC and the CPSC1 start asking for a guard where the fall is more than 30 in. Below that, a toddler platform can go without one. Above it, the guard goes on the open sides of the deck.
- 1U.S. Consumer Product Safety Commission Public Playground Safety Handbook, publication 325
- 2U.S. Consumer Product Safety Commission Safety Tips for Home Playground Equipment, publication 324
- 3City of Seattle 2015 Seattle Residential Code (IRC 2015 adoption), chapter 3 (2015)
The Gaps Matter More Than the Height
A child can push through a gap that is wide enough for the body and then be unable to get the head back out. That is entrapment. The CPSC1 (Publication 325, section 3.3.1) puts the danger zone at openings greater than 3-1/2 in and less than 9 in. The home handbook (Publication 324) says the same for the spaces between steps, posts and guards: under 3-1/2 in or over 9 in. For a guard, that means keeping every opening under 3-1/2 in.
Baluster spacing
Our plans use 2x2 treated balusters with a 3 in gap between them. That is under the 3-1/2 in the CPSC1 warns about and under the 4 in sphere the IRC uses, so one spacing satisfies both. It is an editorial choice of ours (rule TTP-ED-02), not a code figure, and it leaves a margin for lumber that is not perfectly square.
The bottom gap
The space between the deck and the bottom rail is a gap too. We keep the bottom rail 3 in above the deck, our own figure, so a foot or a small body cannot slip under it.
Check every gap, not just the balusters
Count the gaps where the guard meets a post, where it meets the stair or ladder, and where two rails cross. The rule is the same everywhere: never leave an opening of 3-1/2 to 9 in. Hold a 3-1/2 in block against each one before the first child climbs up.
- 1U.S. Consumer Product Safety Commission Public Playground Safety Handbook, publication 325
- 2U.S. Consumer Product Safety Commission Safety Tips for Home Playground Equipment, publication 324
Above 48 In It Is a Barrier, Not a Rail
On a tall fort, the guard has a second job. The CPSC1 home handbook says that on a platform from 48 in to 72 in, you want a protective barrier, not a guardrail, at least 27 in high. A barrier has no crossbars and no toeholds that help a child climb over it (CPSC 324). A guard built from horizontal rails looks safe and works like a ladder.
For that reason our guard changes style as the deck goes up. Above 48 in our rule is a barrier: nothing on the outside face that gives a child a place to put a foot. The simplest way to avoid the problem is to keep the deck low.
- 1U.S. Consumer Product Safety Commission Public Playground Safety Handbook, publication 325
- 2U.S. Consumer Product Safety Commission Safety Tips for Home Playground Equipment, publication 324
Make the Guard Hold
A guard that is the right height and the right width still fails if it flexes. The IRC model loads (Table R301.5, as adopted in Seattle3) call for a single 200 lb force applied in any direction at any point along the top rail, and a separate 50 lb load on the infill. A child leaning on a rail, a group pushing against it, or an adult climbing it to look over, all test those numbers.
Posts
A guard post of at least 4x4 is the model figure in the DCA 6 deck guide (2015), and the joists that receive it should be 2x8 or larger.
Post spacing
We space the guard posts at the corners, beside each opening and no more than 6 ft apart. That is our own editorial figure, not a code line. A longer rail flexes enough to feel unsafe even when it would not break.
- 3City of Seattle 2015 Seattle Residential Code (IRC 2015 adoption), chapter 3 (2015)
Building in Canada
The designer has a Canada mode (NBC 2020). The National Building Code of Canada sets 900 mm for the guard of a single dwelling when the walking surface is up to 1,800 mm above the ground, and 1,070 mm above that (NBC 2020, article 9.8.8.3). It starts asking for a guard at a drop of 600 mm. The code does not say if a play fort counts as a building, so we do not quote it as a requirement. In Canada mode we draw 965 mm (the 38 in figure) up to 1,800 mm, and 1,070 mm above, with the opening kept under 89 mm (3-1/2 in).
See the Guard on a Real Design
The open tree fort is a freestanding deck on four posts, with the guard drawn at 38 in and the baluster gap at 3 in gap. Open the free designer and the guard shows green where it passes our check and amber where it does not. The designer also draws the deck height, which is the other half of the problem: see how high a treehouse should be. For the full set of freestanding designs, start from the tree fort plans.
Depends on where you build
Ask your building department first
Local approval not checked here. Many US jurisdictions exempt play structures up to about 200 sq ft (IRC model), but thresholds, setbacks, HOA and zoning vary. Confirm with your local building department.
Sources
Every number in this guide that does not come from our own treehouse designer was checked against these 3 documents, numbered in the order the text first cites them and read on Oct 25, 2026. 3 are playground guides and codes.
- 1U.S. Consumer Product Safety CommissionPublic Playground Safety Handbook, publication 325
- 2U.S. Consumer Product Safety CommissionSafety Tips for Home Playground Equipment, publication 324
- 3City of Seattle2015 Seattle Residential Code (IRC 2015 adoption), chapter 3 (2015)



