In This Article
Railing Codes
Attaching Posts
Outside Corners
Railings & Balusters
Cable Railings View all DECKING Articles
Sturdy deck railings are an important safety feature for raised decks and are required by code for any deck 30 in. or more above grade. Building codes define the minimum height and strength of the railing system, as well as the size of gaps in the railing – they must be small enough that a small child cannot slip through.
On many older decks the 4×4 posts were notched and then lagged to the rim joist with 3/8 in. or 1/2 in lag bolts or structural screws such as LedgerLoks. More conscientious builders may have used through bolts. The post-to-joist connections were often strong enough, especially with bolts. The weak link in the system, however, was the rim joist that the post was fastened to. Apply enough force to the top of railing and the rim joist would rotate. This can be addressed by reinforcing the rim joist connection to the floor framing (details, below).
On some decks, it’s possible to use 4×4 or larger posts that run continuously from the railing to the footings, supporting both the deck structure and the railing. As long as the posts are not notched, these easily meet the most stringent deck codes.
Another approach gaining in popularity is to use steel connectors to reinforce the post attachment. By using special framing connectors engineered for this specific application, you automatically get a rugged railing and a code-approved connection. And installation is pretty straightforward once and efficient once you’ve done a few decks this way.
Whatever approach you use, make sure your lags, bolts, or other hardware are suitable for today’s highly corrosive treated lumber. That means heavy hot-dipped-galvanized or polymer coatings approved for use with pressure-treated lumber.

Deck Railing Code
The International Residential Code (IRC), adopted by most US cities and towns, requires 36-in.-high deck railings for decks more than 30 in. above the ground. The railing must be strong enough to resist the following loads:
- 125 pound uniform load (per linear foot) applied horizontally or vertically to the railing
- 200 pound point load applied at the top of the post in any direction, or at any point along the railing.
With the standard safety factor of 2.5 used by engineers, that means railing and posts must be designed to resist a 300-pound uniform load or a 500-pound point load. The main concern is a push outward from people leaning against the railing. Few older deck railings can meet this requirement, but building inspectors and professional deck builders are starting to pay more attention to this critical detail. Even if you can squeak by with a weaker railing, do you really want to?
In general, deck posts should be spaced no more than 6 feet apart. Beyond that amount, it becomes very difficult to meet the safety requirements.
Attaching Deck Railing Posts
The problem is that the railing post acts like a lever, exerting a very large force on the connection at the bottom. The weakest link is not the post-to-rim-joist connection, but the rim joist to the floor framing. The only practical way to resist this force with 4×4 wood posts is to with specialized steel framing connectors. Both Simpson Strong Tie and USP now make connectors designed for this application. The connectors fasten to a deck joist (or joist blocking) with heavy ¼ x 1½-in. wood screws and bolt through the post with a ½-in. diameter through-bolts or threaded rods.

The Simpson connectors (DTT2Z ) can be purchased prepacked with the approved screws and a washer for the bolt head in the post. The USP version (DTB-TZ) installs with the company’s polymer-coated WS15-GC screws. Both companies also sell stainless-steel connectors and screws, designated SS. As an engineered connection, it’s always best to use the fasteners specified by the manufacturer and not to stick with the same company for connectors and screws.
While the connectors are moderately expensive at $8 to $10 each (less by the box), they install quickly and provide a rock-solid connection that is virtually impossible to achieve any other way.
The installation details differ somewhat depending on whether the post is installed inside or outside the outer joist (called a rim or band joist) and whether the rim joist runs perpendicular or parallel to the deck joists. To avoid confusion, we’ll refer to parallel rim joist as an end joist.
The most difficult part of the installation is accurately drilling two 9/16-in. holes in each post for the 1/2-inch bolts or threaded rod. Most installers use a marking jig to locate the holes. A drill press is helpful to keep the holes square to the post. Otherwise a good eye and steady hand are essential.
In general, the steel connector is used with the upper bolt, about 2 inches down from the top of the joist. The lower hole receives a bolt with washers. For longer connections, threaded steel rod is used rather than bolts.
Outside the rim joist. This is the most common installation and the simplest if the post aligns with a floor joist (see Detail A, below). If the post is between two joists, you will need to use two connectors, one on each nearby joist, and bolt to post to the rim joist between the two connectors.
Outside the end joist. Where the rim joist runs parallel to the joists (sometimes called an “end joist”) blocking must be added to tie into the second joist. This joist requires two connectors as shows (Detail B, below).


Inside the rim joist. Posts placed inside the rim joist need to align with a perpendicular joist. The connecting joist needs to be reinforced with blocking fastened with 24 10d nails. (Detail A, below).
Inside the end joist. This connection requires double blocking, plus an extra long bolt or threaded rod to transfer the load to the next joist bay (Detail B, below). A single corner post (not shown) can be installed the same way. Remember all hardware must be rated for use with pressure-treated lumber — either hot-dip galvanized or treated with approved coatings.

OUTSIDE CORNERS
Outside corners pose special problems with post brackets. To keep the bolts from hitting one another, they need to be offset vertically about 1/2 inch, and additional blocking is often required.
Posts on the inside. With posts on the inside of deck joists joist, you can use two corner posts, as shown in the detail above. With two corner posts, the top rails extend beyond the posts and meet at the corner. Another option is to use a single post at the corner, installed the same way as the inside posts in Detail A, above.
Posts on the outside (set back from corner). With posts outside the joists, the simplest approach is to use two posts at each corner, held back far enough to line up with the second joist, about 12 to 16 inches from the corner. The top rails extend beyond the posts to meet at the corner (see detail, below left).
Posts on the outside (close to corner). If you prefer the corner posts to be close together, you can use the same steel brackets with blocking on one side to position and support the second bracket (detail, below right). Also, you must offset the top and bottom bolts by 1/2 inch vertically. Note: You can view both both the upper bolt, with bracket, and lower bolt with washers in Detail A and B above.


ALTERNATIVE METHODS
If using steel tension ties seems like overkill, there are simpler methods for attaching guardrail posts. Two ½ in. bolts through the rim or end joist can meet the building code as long as the rim joist is adequately braced against rotating. Depending on the local code and its interpretation by the building inspector (e.g., the safety factor required), the detail shown below should be acceptable in many locales. If in doubt, have an engineer calculate the specific size and number of lag bolts or structural screws to meet the local code.

For the fast code-compliant connections, use timber screws instead of through-bolts. In general these don’t need pre-drilling and can provide structurally ratings that will meet deck codes. The detail below, from Simpson StrongTie, is specifically for their SDWS Timber Screws, but TimberLok screws or other structurally rated timber screws can work as well.

RAILINGS & BALUSTERS
To meet code standards, the railings that span from post to post should be as sturdy as the posts themselves. To achieve the necessary strength, it’s best to use at least 2×6 railing, either flat or vertical. Use the longest pieces available, with a continuous length for each side of the deck, if possible. Posts should be no more than 6 to 8 feet apart, depending on local codes.

In rainy climates, the top railing should be either sloped or chamfered at the edges to shed water. A drip cap below overhanging edges is also recommended (see illustration).
At inside and outside corners where two railings meet, I often use a galvanized steel angle or flat brace to support the joint . This is cheap, but effective, insurance against the corner separating over time. I typically use similar steel hardware to reinforce where the railing connects to the main structure.
Code requirements for balusters. For child safety, the balusters or other decorative infill must be spaced less than 4 inches apart. In code-speak, a 4-in.-diameter ball should not pass through the spaces. For railings along stairs, the spaces can be a little larger, but less than 4-3/8 in.
The balusters or other infill between the posts should be able to resist a load of 50 pounds applied over one square foot. Using the engineer’s safety factor of 2.5, the test load would be 125 pounds. To comply with code, and for common sense, you don’t want to fill between your sturdy posts and top rails with flimsy infill.
Baluster and infill options. On a site-built wood railing, balusters can be metal, steel cable, or any sturdy material, but the most common are 2×2’s, nailed or screwed directly to the rim joist or attached to the bottom rail. Three common baluster layouts are shown in the illustration above.
With 2x2s, choose good stock and reject any pieces with large knots or other defects that might weaken the baluster. Use stainless steel, coated, or hot-dipped galvanized nails or screws that are rate for use with today’s pressure-treated wood. At a minimum, use either one screw or two spiral-shank nails top and bottom on each baluster.

A common detail has the balusters nailed to top and bottom 2×4 rails toe-nailed to the sides of the vertical posts. Toe-nails tend to split the 2x4s and are not likely to meet the code requirements for the infill area. Steel brackets, like the RailLok, can simplify the connection of the top and bottom railings to the posts.

Cable Railings
Horizontal infill made from stainless-steel cable is a popular choice on high-end decks, especially where the owners want unobstructed views. Like all infill options, these need to comply with the 4-inch rule (max. space between cables) and structural codes. Manufactured systems are available with all the components including steel posts. It is not too difficult to build your own cable railing with components now readily available from specialty manufacturers (photos below). Still plan on some extra time until you learn the particular system – each has its quirks.


Manufactured Railings. Most major manufacturers of composite and plastic decking offer manufactured railing systems that can be used with their decking or as a standalone system. Most prefab systems go together pretty quickly and are engineered to meet the strength requirements of the building code. They also offer the promise of low maintenance, although this is less of a concern than within decking. Vertical components, such as railing systems, get less sun exposure and less wear and tear than decking, so they tend to stand up well over time. A flat 2×6 used for the top railing that is neither sloped or chamfered is, however, prone to the same type of cupping and checking that affects decking boards.
Read more on Attaching Deck Railings to Posts
Fred says
Do Manufacture Railing Systems Meet Code>
I have an elevated deck that is at 9 1/2 ft. above grade. I need to install guard rail that is 36 in. high and has posts every 6 ft. Can i use a composite guard rail system like Dekorators or Trex?
buildingadvisor says
The building code (IRC) specifies the minimum strength and height of a railing system, along with the allowable open space between the balusters or other railing infill . You can use any materials that meet those criteria. Since most contractors use wood, there are “prescriptive” guides that show how to build code-approved wood decks and railings. The most widely used is the Prescriptive Residential Wood Deck Construction Guide from the American Wood Council.
You can design your own system with other materials, but it is easier to use a pre-manufactured system that has already been tested for code compliance. Manufacturers submit their products to third-party accredited labs. Based on these tests, standards organizations then publish “evaluation reports “certifying that the product or system meets the code.
The gold standard for code approval is an evaluation report from the International Code Council, which issues ICC-ES reports based on third-party testing. However, there are a number of other established organizations that can issue code-evaluation reports. In most cases, code officials accept these reports as valid, but are not legally obligated to do so.
Evaluation reports for Trex and Dekorators railing system are available from their manufacturers. These reports are produced by Intertek, another organization that works closely with the ICC (International Code Council).
Your best bet is to contact the manufacturer for a code-evaluation report for the specific railing system you are considering. If you still uncertain, then contact your local building code official to make sure that they will approve the system. Be aware that you need to closely follow the manufacturer’s instructions to ensure code compliance.
In the real world, many site-built railing systems get approved that fall short of full code compliance. Since every railing detail is not subjected to engineered testing, a certain amount of commonsense judgement is applied by the building inspector. They have the final say and some are stricter than others. So if you are planning anything out of the ordinary, best to run your plan by the inspector before construction.
Dave says
Remodeled Deck Railing Doesn’t Reach Stair Landing
I had a landscaper add a 3′ x 3′ landing off our existing deck (that serves as the first ‘step’) so that we were able to install stairs lengthwise along the side of the existing deck so that we were able to conserve space. The stairs descend off the landing to the ground 6ft below. Our railing completely enclosed our deck, but needed to be cut in order to open up to the landing and the staircase.
My main question is… the landscaper cut our existing railing so that instead of opening safely to the new landing, it opens up to the new landing and the 1st and part of the 2nd stairs. Anyone in the dark holding the existing railing post and turning to go down the stairs will expect to step onto the landing, but will possibly hit the 1st or 2nd stair and fall. In my opinion, the railing was cut 16 – 18″ too short. Specifically, is there a code and minimum distance a railing must extend beyond the stairs, as I suspect cutting a railing so that is parallel with the first stair is also a little too close? See Photo below:

buildingadvisor says
You are correct that the contractor has created a safety hazard here. The deck railing (at right, in the photo) should run all the way to the beginning of the landing. Finding code support for this is little tricky, however, as he IRC building code does not specifically address this issue – probably because it is governed by common sense.
The reality is that no building code (or other law) can address every possible situation. So building inspectors are left with the responsibility of interpreting the code and applying it to the situation at hand.
The relevant rules, found in IRC Sections R311 and R312, are:
• All decks 30 in. or more above grade must have a guard (handrail) a minimum of 36 in. high.
• All deck stairs must have a handrail on at least one side of the stair, at a height of 34 to 38 in. measured vertically from the nosing of each tread.
Looks like your contractor did a fine job on the railing for the stairs and landing, but cut the main deck railing too short. Common sense would argue that the deck railing should extend to the beginning of the landing. As you point out, someone could easily take a turn there, expecting to step onto a landing or tread about 7 in. below. Instead, they would either land on a step 14 in. or 21 in. below, and likely stumble.
From a code standpoint, I would view these drop-offs, unprotected by either stain railings or deck guardrails, as violations of the rule limiting stair risers to 7-3/4 in. These unexpected steps downward are two to three times the allowable riser height. A would hope a code official would agree with this interpretation.
Rules governing stairs are very strict because any unexpected variation in a set of stairs can lead to a fall. We tend to go up and down stairs on auto-pilot and don’t like surprises like the one created here. Best of luck in getting this corrected.
Jen says
Hi Dan,
We’re running into a similar issue here, except that our contractor didn’t install guardrails on the right side of the stairs (which are exposed). You seem to have a similar set-up to ours in that we also have stairs going length-wise down the side of the deck. I’m curious if you wouldn’t mind sharing what the view from the other side of the stairs is. Trying to figure out a solution to our issue here, as the stairs aren’t wide enough to install a second set of guardrails down the right side.
Daniel Miles says
Should I Offset Bolts in Railing Post?
Should the through bolts in the railing post be offset from the centerline of the post? For example on 4×4 post should the bottom bolt be 1 1/2 inch from the left side and the top bolt be 1 1/2 from the right side of the post? Which, if my brain is functioning, would make the bolts about 1/2 inch off center and 1 inch apart.
Thanks,
Dan
buildingadvisor says
Yes, the bolts would be offset about ½ inch if you drill the holes 1½ inches in from each edge of the 4×4.
Most people do not offset the bolts this way and simply place them on the centerline of the post. In fact, if you use specialized hardware, like the Simpson DTT2Z, that bolt needs to go on the centerline unless you use blocking to offset the connector.
The model deck codes and the testing of the post connections (that the code is based on) all place the bolts on the centerline – one 2 in. from the top of the joist and one 2 in. from the bottom of the joist.
That said, it never hurts to offset fasteners in this way to reduce the tendency of wood to split along the grain line. Most steel connectors have offset holes for this reason. However, it is not necessary with two bolts in a 4×4 post.
Jackie Stonebraker says
Alternatives to Cable Railings?
I’m in the initial planning phase of having a 18 x16 screened in deck built. I wanted to have a finished wall but just found out that the knee wall has to be 36″ which is not the look I was going for. I would be happy with an 18″ knee wall with a cable railing system on top to equal the distance of 36″. I don’t want to go with baluster as the fill in. I’m looking for some other option suggestions if you have any. The look I am going with is more industrial which is why the cable is appealing to me. I am finishing the knee wall in galvanized tin. Thanks!
buildingadvisor says
A cable system would be a good choice. The cables are nearly invisible and do not obstruct views the way vertical balusters do. Most people use stainless steel, which is the strongest and most corrosion-resistant material, but you can also use less expensive aluminum cables which are fine as long as you not near salt water. As with any railing system, the spacing between the cables (or baluster) must be less than 4 inches to meet code.
The only type of railing I know of that is less obtrusive than cable is clear acrylic or tempered-glass panels. Acrylic are less expensive, but prone to scratching over time. However, they should stay clear and are not subject to yellowing like polycarbonate and other plastics.
Clear panels might go well with your industrial look. Pre-manufactured systems are usually the best way to go with either cable or glass/acrylic railings. Cobbling a system together from standard hardware often results in a job with some rough edges and long-term performance problems.
You can see one example of a glass railing at this link or just Google “plexiglass railing system” or “glass railing system”.
Best of luck with your deck project!
See also Cable Railing Systems
Wes says
Railings for Screened Porches
What are the options for a porch railing when you plan to add screen?
buildingadvisor says
The building code (IRC) for decks applies whether the deck or porch is open or screened.
That is, you still need a 36-inch high code-approved railing if the deck surface is more than 30 in. above grade. Typically the railing is built inside the screening as in this photo (from my book Best Practices for Residential Construction):
Another option is to build a 36-in.-high knee-wall along the edges of the porch and add screening only to the top portion of the wall. That gives you a bit more privacy and you still get plenty of ventilation.
Best of luck with your new porch!
Chris says
Notched Railing Posts Are Shaky and Cracking
We recently had our old 800 sq ft deck replaced the total charge being about $37,000 for removal and reconstruction using treated lumber. The only change to the old deck’s footprint was to the rail design which is now a cable rail. The rail posts were notched and shake too much for my liking in some locations as well as splitting occurring at the notch. We are thinking of having them redone and mounted to the outside of the deck framing. Since the cables wouldn’t be over the deck would an additional board along the bottom be required to keep feet from getting caught between the end of the deck and bottom cable?
buildingadvisor says
Building codes are pretty strict regarding attachment of deck railing posts. It is very difficult to meet code standards with notched posts. Also, as you have observed, notched posts are prone to splitting at the stress point at the inside corner of the notch.
One thing that not spelled out in the code is the vertical alignment of the vertical balusters (or horizontal cables) with the outside edge of the deck. Generally, the inside edge of the balusters or cables aligns with the outside edge of the decking – or is inboard of the decking edge. You don’t want the railing system hanging out in space.
The relevant code requirement is that the gaps between the balusters, and the gap at the bottom of the railing system, is less than 4 inches. In other words, the measurement from your bottom cable to the decking should be less than 4 inches. To meet this requirement, you may need to add an extra piece of decking or adjust the location of the bottom cable.
Regardless of the code, if you find the gap at the bottom of your railing system is causing problems, then you should extend the decking outward. You can support the extra piece of decking with a 2×4 nailed to the band or rim joist, shimmed out as needed.
Railing posts on a deck should not be shaky or splitting. You paid a lot of money for your new deck and the job should be done correctly. It is reasonable to ask the contractor to replace the railing posts at no charge. To bolster your case, you may want to have your local code official inspect the new deck. It is unlikely that the railing posts meet the current building code.