Deck Railing Options: Wood, Composite, Cable, and Code Requirements
FriendsWithTools.io earns a commission from qualifying purchases made through links on this page, at no additional cost to you. We do not test these tools ourselves — all claims are sourced from manufacturer specifications, retailer listings, and aggregated user reviews, each linked inline. Prices and ratings were verified on April 2026 and may have changed.
Deck railings are one of the few parts of a deck that are both structural and aesthetic — they have to meet building code for safety and they define the look of the deck from the street. Code requirements (36 to 42 inches high, no more than 4-inch gaps between balusters, specific post-to-structure connections) are non-negotiable. Beyond code, you have a wide range of material and style options at price points from $15 to $100+ per linear foot.
Code Requirements
Railing height: 36 inches minimum for residential decks up to 30 inches above grade. Many jurisdictions require 42 inches for decks higher than 30 inches (and the International Building Code requires 42 inches for everything). Check your local code — going with 42 inches is the safest bet for compliance.
Baluster spacing: no opening in the railing should allow a 4-inch sphere to pass through. This means maximum 3.75 inches between balusters (accounting for the baluster width). For horizontal railings (cables, bars), the same 4-inch sphere rule applies at every point. This prevents children from getting their heads through the railing.
Post spacing: most codes require railing posts no more than 6 to 8 feet apart, with a post at any stair landing and at both sides of any gate. Posts must withstand a 200-pound lateral load applied at the top — this determines how they're attached to the deck structure. Through-bolting or structural post brackets anchored to the rim joist are the standard connection methods.
Stair railings: required on stairs with more than 3 risers in most jurisdictions. The railing must be continuous along the stair run, graspable (1.25 to 2-inch diameter for a graspable handrail), and at a height of 34 to 38 inches measured vertically from the stair nose. This is a separate requirement from the guard rail — a wide flat top rail doesn't meet the graspable handrail requirement.
Wood Railings
Pressure-treated pine is the budget option ($15 to $25 per linear foot installed). It's strong, readily available, and takes paint or stain well. The tradeoff is maintenance — it needs staining or painting every 2 to 3 years and will crack, warp, and split over time. Use kiln-dried after treatment (KDAT) material when available — it starts straight and is ready to finish immediately, unlike standard pressure-treated which ships wet.
Cedar costs about double ($25 to $50 per linear foot) and offers natural rot resistance, a warm reddish color, and dimensional stability. It can be left to weather to a silver-gray or finished with a clear sealer. Cedar is softer than treated pine, so it dents more easily, but it holds fasteners well and resists splitting.
For both wood types, the post-to-deck connection is critical. Through-bolting the post to the rim joist or using a structural post bracket (like Simpson Strong-Tie DTT series) is code-compliant. Notching the post to sit on the deck surface and bolting through both is the strongest connection. Never rely on screws alone for post attachment — screws in withdrawal don't provide adequate lateral strength.
Composite and PVC Railings
Composite railings ($40 to $80 per linear foot) match composite decking and come in complete kits with posts, rails, balusters, and hardware. No painting, staining, or sealing — ever. The color is consistent and doesn't fade significantly. Most composite railing systems are designed so the structural strength comes from an aluminum insert inside the post sleeve; the composite material is cosmetic.
PVC railings ($30 to $60 per linear foot) are similar in maintenance and appearance but use cellular PVC instead of composite. They're lighter than composite, available in white and a few colors, and don't absorb moisture at all. PVC can become brittle in extreme cold and can sag in extreme heat, so check the manufacturer's temperature ratings for your climate.
Both composite and PVC railing systems are designed as integrated kits — the components are engineered to work together. Mixing brands or improvising with non-kit components usually results in poor fit, warranty issues, and connections that don't meet code.
Cable and Metal Railings
Cable railings use horizontal stainless steel cables (typically 1/8 inch diameter) tensioned between posts. They provide an open, modern look with minimal visual obstruction — good for decks with views. The cables must meet the 4-inch sphere rule, which means cable spacing of about 3 inches. Each cable needs a tensioning fitting (turnbuckle or swage fitting) at one end. Cables stretch over time and need periodic re-tensioning.
Aluminum railings ($50 to $100 per linear foot) come in powder-coated systems with a range of styles from traditional to modern. They don't rust, don't need painting, and are strong relative to their weight. Most aluminum systems use a top rail, bottom rail, and individual balusters that snap or screw into the rails.
Steel railings ($60 to $120+ per linear foot) are the strongest option and allow for thinner profiles and wider post spacing. Powder-coated steel resists corrosion but any scratch or chip that exposes bare steel will rust. Stainless steel eliminates the corrosion concern but costs significantly more.
Installation Basics
Set posts first. The railing system is only as good as the post connections. Plumb each post in both directions and secure it to the structure before attaching rails and balusters. For surface-mount posts (attached to the top of the deck), use structural brackets bolted through the rim joist or blocking. For face-mount posts (attached to the side of the rim joist), through-bolt with large washers or use a manufacturer-specified bracket.
Top and bottom rails span between posts. For wood railings, the bottom rail is typically a 2x4 flat or on edge, with balusters attached to it. The top rail is a 2x4 or 2x6 that caps the balusters. For kit systems (composite, aluminum), the rails are extruded profiles with slots or holes for baluster attachment.
Space balusters consistently using a spacer block cut to 3.5 inches (maximum opening of 3.75 inches minus the width of any variation). Start from one end and check for square and plumb every 5 to 10 balusters. Small errors accumulate over a long railing run.
Frequently Asked Questions
Do I need a permit for a deck railing?
If the railing is part of a new deck or a deck replacement, the permit covers the railing. If you're adding or replacing railings on an existing deck, check your local building department — some jurisdictions require a permit for any structural work on a deck, including railings. Even without a permit requirement, the railing must meet code because it will be evaluated if you sell the house.
Can I use horizontal boards instead of vertical balusters?
Horizontal boards or slats must still meet the 4-inch sphere rule at every point. Many jurisdictions also discourage or prohibit horizontal railing designs because they create a ladder effect — children can climb them by stepping on the horizontal members. Check your local code before committing to a horizontal design.
How do I attach railing posts to an existing deck?
Surface-mount brackets (bolted through the decking and into the rim joist or blocking underneath) are the most common retrofit approach. Remove the decking board at each post location, add blocking between the joists if the post doesn't land on the rim joist, bolt the bracket through, and replace the decking. Face-mount brackets attach to the outside of the rim joist with through-bolts. Either method works — the key is that the bolts go into structural framing, not just decking.