Deck Railing Code Requirements
Deck railings are one of the most code-regulated components of a deck build. The IRC requires a railing (guard) on any deck surface 30 inches or more above grade. The minimum height is 36 inches for residential decks (some jurisdictions require 42 inches). And balusters must be spaced so that a 4-inch sphere cannot pass between them — that's the child safety rule.
Minimum height: 36" (some codes require 42")
Baluster spacing: 4" maximum gap (4" sphere test)
Post spacing: 6–8 ft maximum (varies by code)
Railing posts must be securely attached to the deck framing — not just the decking surface. Through-bolted to the rim joist or inner joist is the standard method. Surface-mounted post brackets are acceptable if they're rated for the application. Posts should be spaced no more than 6–8 feet apart depending on the rail material and local code.