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 May 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 for height, baluster spacing, and post connections are non-negotiable. Beyond code, you have a wide range of material and style options at price points from $15 to $100 or more per linear foot. This guide covers what the code requires, what each material option delivers, and how to install railings that pass inspection and last.
Code Requirements
Railing height is the first number to know. The minimum is 36 inches for residential decks up to 30 inches above grade. Many jurisdictions require 42 inches for decks higher than 30 inches above the ground, and the International Building Code requires 42 inches for everything regardless of height. Check your local code before ordering materials. Going with 42 inches is the safest bet for compliance and resale, even if your jurisdiction allows 36.
Baluster spacing follows the 4-inch sphere rule: no opening in the railing should allow a 4-inch sphere to pass through. In practice, this means a maximum gap of about 3.75 inches between balusters, accounting for the baluster width. For horizontal railing designs (cables, horizontal boards, metal bars), the same 4-inch sphere rule applies at every point along the railing. This requirement exists to prevent children from getting their heads through the railing.
Post spacing requirements vary by jurisdiction, but most codes require railing posts no more than 6 to 8 feet apart. A post is required at any stair landing, at both sides of any gate, and at any change in direction. Posts must withstand a 200-pound lateral load applied at the top of the post. This load requirement determines how posts are attached to the deck structure. Surface screws alone do not meet this standard. Through-bolting or structural post brackets anchored to the rim joist are the accepted connection methods.
Stair railings are required on stairs with more than 3 risers in most jurisdictions. The railing must be continuous along the entire stair run, graspable (1.25 to 2 inches in diameter for a round handrail), and at a height of 34 to 38 inches measured vertically from the stair nosing. This graspable handrail is a separate requirement from the guard rail. A wide, flat top rail does not meet the graspable handrail requirement. You may need to add a separate round or profiled handrail along the inside of the stair guard.
Wood Railings
Pressure-treated pine is the budget option at $15 to $25 per linear foot installed. It is strong, readily available at every lumber yard, and takes paint or stain well. The tradeoff is maintenance: pressure-treated wood needs staining or painting every 2 to 3 years and will crack, warp, and split over time as it goes through wet-dry cycles. Use kiln-dried after treatment (KDAT) material when available. KDAT lumber starts straighter and drier than standard pressure-treated, which ships wet and can twist and cup as it dries on your deck.
Cedar costs about double at $25 to $50 per linear foot and offers natural rot resistance, a warm reddish-brown color, and better dimensional stability than treated pine. Cedar can be left unfinished to weather to a silver-gray patina, or finished with a clear or tinted sealer to preserve the original color. It is softer than treated pine, so it dents more easily from impacts, but it holds fasteners well and resists splitting when screwed near edges.
For both wood types, the post-to-deck connection is the most critical structural detail. Through-bolting the post to the rim joist with 1/2-inch carriage bolts is the traditional code-compliant method. Notching the bottom of the post to sit on the deck surface while the unnotched portion extends down alongside the rim joist, then bolting through both, creates the strongest connection. Alternatively, structural post brackets (like the Simpson Strong-Tie DTT series) bolt to the rim joist and accept the post base, providing a tested and rated connection. Never rely on screws alone for post attachment. Screws in withdrawal (being pulled straight out) do not provide adequate lateral strength to meet the 200-pound load requirement.
Composite and PVC Railings
Composite railings run $40 to $80 per linear foot and are designed to match composite decking from the same manufacturer. They come in complete kits with posts, top rails, bottom rails, balusters, and all mounting hardware. The major advantage is zero maintenance: no painting, staining, or sealing, ever. The color is consistent from panel to panel and does not fade significantly over the life of the product.
Most composite railing systems are engineered with an aluminum insert inside the post sleeve. The structural strength comes from the aluminum; the composite material is cosmetic. This means the post looks like wood or composite on the outside but performs like a metal post structurally. The aluminum insert is what allows these systems to meet the 200-pound lateral load requirement at code-compliant post spacings.
PVC (cellular vinyl) railings run $30 to $60 per linear foot and are similar in maintenance and appearance to composite. They are lighter weight, available primarily in white and a few neutral colors, and do not absorb moisture at all. PVC can become brittle in extreme cold (below about minus 10 degrees Fahrenheit, impacts can crack the material) and can sag slightly in extreme heat (above about 110 degrees in direct sun). Check the manufacturer's temperature ratings for your climate before choosing PVC.
Both composite and PVC railing systems are designed as integrated kits. The components are engineered to work together for both structural performance and appearance. Mixing brands or improvising with non-kit components usually results in poor fit, warranty issues, and connections that may not meet code. If you choose a kit system, commit to using all components from the same manufacturer and product line.
Cable and Metal Railings
Cable railings use horizontal stainless steel cables, typically 1/8 inch in diameter, tensioned between posts. They provide an open, modern look with minimal visual obstruction, making them a popular choice for decks with views of water, mountains, or landscaping. The cables must meet the 4-inch sphere rule, which translates to cable spacing of about 3 inches on center. Each cable needs a tensioning fitting (turnbuckle or swage fitting) at one end.
Cable railings require periodic maintenance that other systems do not. Cables stretch over time under tension and from temperature changes. Plan to re-tension cables once or twice a year for the first few years, and then annually after that. Posts for cable railings need to be stronger and more rigidly mounted than for baluster railings because the cable tension pulls the end posts inward. Intermediate posts also need to resist the lateral load of the tensioned cables. Most cable railing manufacturers specify maximum post spacing of 4 to 6 feet, tighter than the 8-foot maximum common with baluster systems.
Aluminum railings ($50 to $100 per linear foot) come in powder-coated systems with a range of styles from traditional picket to sleek modern profiles. Aluminum does not rust, does not need painting, and is strong relative to its weight. Most aluminum systems use a top rail, bottom rail, and individual balusters that snap or screw into the rails. Installation is straightforward with basic tools.
Steel railings ($60 to $120 or more per linear foot) are the strongest option and allow for thinner profiles and wider post spacing than other materials. Powder-coated steel resists corrosion effectively, but any scratch or chip that exposes bare steel will rust if not touched up promptly. Stainless steel eliminates the corrosion concern entirely but costs significantly more and is typically custom fabricated.
Installation Basics
Set posts first. The entire railing system is only as good as the post connections. Plumb each post in both directions (front-to-back and side-to-side) and secure it to the deck structure before attaching any rails or balusters. For surface-mount posts (attached to the top of the deck), use structural brackets bolted through the decking and into the rim joist or blocking underneath. For face-mount posts (attached to the outside face of the rim joist), through-bolt with large washers or use a manufacturer-specified mounting bracket.
Top and bottom rails span between posts. For wood railings, the bottom rail is typically a 2x4 laid flat or on edge, with balusters attached to it by screwing through the rail from below or by using galvanized baluster connectors. The top rail is a 2x4 or 2x6 that caps the balusters. Some designs use a separate cap rail (a wider flat board) on top of the structural top rail for a more comfortable feel and finished look.
For kit systems (composite, aluminum, PVC), the rails are extruded profiles with pre-punched slots or holes for baluster attachment. Follow the manufacturer's instructions exactly. Kit systems are designed with specific tolerances and connection methods. Improvising usually results in a railing that does not look or perform as intended.
Space balusters consistently using a spacer block cut to 3.5 inches (giving you a maximum opening of about 3.75 inches after accounting for the baluster width). Start from one end and check for plumb every 5 to 10 balusters. Small errors accumulate over a long railing run. If your spacing does not work out evenly, adjust the gaps slightly over the last few balusters rather than ending with one obviously wide or narrow gap.
Tools for Deck Railing Installation
A basic deck railing installation requires a drill/driver (for structural screws and pre-drilling), a socket wrench or impact driver (for lag bolts and carriage bolts), a level (4-foot for posts, torpedo for checking individual balusters), a tape measure, a circular saw or miter saw (for cutting rails and balusters to length), and a speed square for marking square cuts.
For cable railing, add cable cutters (not wire cutters; cable cutters produce a clean end that threads into fittings), a swaging tool if using swage fittings, and a wrench for tensioning turnbuckles. For composite and aluminum kit systems, a miter saw with a fine-tooth blade (60 to 80 teeth on a 10-inch blade) produces clean cuts without chipping or melting the material.
If you are face-mounting posts to the rim joist, you will need to drill bolt holes through the joist. A long 1/2-inch drill bit and a right-angle drill or drill adapter help reach bolts that are close to the deck surface. Pre-drill every bolt hole slightly undersized to prevent splitting in older lumber.
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 deck permit covers the railing. If you are 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. An inspector or appraiser who spots non-compliant railings can flag them as a safety issue.
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 explicitly 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. Some jurisdictions allow horizontal rails only on decks less than 30 inches above grade where a guard rail is not technically required.
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 does not land on the rim joist, bolt the bracket through the blocking, and replace the decking around the bracket base. 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 material.