Start with the connection. A guard needs a secure connection to the deck frame, solid blocking and the fasteners specified for the chosen system. Check the post detail before setting out the rails or drilling into the deck.
Two documented routes, and you have to pick one
Almost every argument about deck railings comes from mixing two different systems that each work on their own. In Ontario there are two routes, and they diverge at the first decision.
Prescriptive wood guard
Site-build from dimensional lumber to the SB-7 details: 4x4 posts, 2x2 pickets, a 2x6 top rail and the published fastener schedule at every joint.
SourceOntario's building officials publish it in a fill-in deck guide, so a plans examiner can check it without engineering.
Evaluated manufactured system
Buy aluminum, composite, glass or cable as one family and install it to that family's current manual.
SourceOntario's deck guide: “for prefabricated guard systems, provide engineering for guard system and glass (if applicable) from the manufacturer.”
What you cannot do is average them. A prescriptive picket spacing does not license a manufactured system's post spacing, and a manufacturer's bracket does not stand in for a Code detail on a site-built guard. Whichever route you take, one document governs — and it is not this page. Our railings hub is where to compare the systems before you commit to one, and if you have narrowed it to metal, iron versus aluminum covers what each one asks of you after it is up.
The numbers, and which of them are ceilings
Guard height, opening size and post spacing answer different questions. Some figures are minimum heights; others are maximum openings or spans. Use the rule for the exact system and deck height.
Post spacing is the figure most often quoted as though it were a property of the material. It is not. It belongs to whichever route you took:
| System | Published spacing |
|---|---|
| Prescriptive wood guard, Ontario deck guide | 4 ft 11 in. maximum between guard posts |
| Trex Enhance and Trex Select railing | Manufactured to a 6 ft clear span (72 in. rails) |
| Trex Transcend railing | 96 in. (2,438 mm) on centre |
| Trex Signature railing | 96 in. (2,438 mm) clear span |
The practical consequence is that posts have to be set out before the deck boards go down, from the rail lengths you are actually buying. Trex is blunt about the sequence: its rails are made slightly long to allow for play in post placement, and “IT IS VERY IMPORTANT TO MEASURE FIRST.”
The connection that actually holds it up
Every guard turns a horizontal push at the top rail into a lever on the post. The higher the rail, the longer the lever, and the whole force lands on a few inches of frame at the bottom. That is why the two source documents spend most of their guard content on one connection.
Three things hold across both routes:
Fix it to the frame
Fix the post to the frame, never to the deck boards.
SourceCanadian evaluations say composite and PVC boards are “not to be considered as an equivalent to dimensional lumber.”
Block behind every post
Add solid blocking behind each guard post — on a re-rail, from underneath.
SourceTrex: “Blocking MUST be added for extra strength.” Ontario's detail shows it as typical.
2x8 joists minimum
If the frame is 2x6 and the deck needs a guard, reframe first — see the deck framing guide.
SourceOntario: “guards require min. 2" x 8" joists” (2x6 only on a low deck with no guard). Trex: “minimum joist size is 2" x 8".”
The prescriptive route reaches the same place with nails and screws instead of bolts: solid blocking, four 76 mm (3 in.) nails each side plus four #9 x 76 mm screws each side into the rim board, the post carried at least 1½ in. below the joists, and a framing anchor of at least 20 gauge. The manufactured route uses ½ in. carriage bolts, the top bolt 1 in. below the top of the joists and the next 5⅛ in. below that. Different hardware, same principle: the post has to be gripped over a depth of frame, not pinned at one point.
Stairs, and the handrail that is not the guard
A stair flight carries two separate requirements that people routinely merge into one, and the second is the one that gets left off.
The stair guard
Required once the finished deck reaches 24 in., at 36 in. high, with a minimum 4x4 post at the top and bottom of the flight.
Ontario deck guideThe 4 in. ceiling applies to picket gaps and the open riser gap. Ontario asks for “adequate blocking to prevent lateral movement.”
The handrail
Add one on stairs with three or more risers, 34 in. to 42 in. high.
Ontario deck guideThe top rail “must be continuously graspable” — a 2x6 laid flat is not.
Manufactured systems add their own stair rules on top. Trex requires pressure-treated stair posts to be installed on the inside of the stair stringer and at the nose of the tread, keeps post-to-post span under 6 ft, and warns against setting stair posts at a full 6 ft because the angled rails then come out too short. It also asks for code-approved hardware plus added blocking at every stair post — and, on the bracket screws, to set the drill to low speed and low clutch and not to use an impact driver.
What to hand your installer, or take to the counter
Bring these eight details to your installer or supplier so they can identify a suitable system and check the scope of the work:
Height at each run
Picks the 36 in. or 42 in. guard, and whether a guard is needed at all.
What the frame is
Joist size, rim condition, and whether blocking can still go in from underneath.
NoteOn a re-rail, this decides the price.
Which route
Site-built to SB-7, or one named manufactured family. Not a mix.
Runs measured
Straight runs, corners, returns, gates and stair flights listed separately — posts are set out from rail lengths.
Stairs counted
Flights and risers per flight; three or more risers means a handrail as well as a guard.
Glass or not
Glass brings the manufacturer's engineering requirement. See the glass railings guide.
What your municipality wants
Drawings, permit and inspection timing. Toronto publishes its thresholds and drawing list.
Any lighting
Run the cable inside the post before the guard is assembled. See deck lighting design.
NoteNo manufacturer permits a light cut into a top rail, bottom rail or baluster.
Ontario's own deck guide adds one more, and it is easy to miss on a cover page: if an alternative guardrail is proposed, the approvals for it have to be submitted with the permit application — not produced afterwards when an inspector asks.
When it comes to buying, Composite Deck Shop's railing collections list the current Ontario range, colours and prices.
Common questions
How high does a deck railing have to be in Ontario?
It depends on how high the deck is, and it is two thresholds rather than a range. The OBOA deck guide gives 36 in. where the deck is less than 5 ft 11 in. above grade and 42 in. where it is more. In the Code's own metric those are the 900 mm and 1,070 mm guard heights, with 900 mm available for a qualifying exterior residential guard up to 1,800 mm above finished ground. A guard becomes necessary once the walking surface is more than 24 in. above the ground.
Do I need a permit to replace a deck railing?
Ask your municipality before you order, because the answer depends on what else you are doing and where you are. Replacing a guard on a deck that already has a permit is treated differently from building a new raised deck, and Toronto publishes its own thresholds and drawing requirements. What is not optional either way is the standard the guard is built to — one of the two documented routes described on this page.
Useful sources
Code editions, municipal interpretation and manufacturer instructions are all revised on their own schedules. Open the sources below and confirm against the edition in force and the exact system before anything is ordered or built.
- OBOA Southwestern Chapter — Deck Guide 2022 (PDF, published by the City of Sarnia): the guard trigger at 24 in., the 36 in. and 42 in. heights by deck height, the 4 ft 11 in. post spacing, the 4 in. maximum picket gap, the SB-7 guard post attachment schedule, the 1½ in. post extension below the joists, the 2x8 joist minimum, the stair guard and handrail rules, and the requirement for manufacturer engineering on prefabricated guard systems and glass.
- Trex Enhance Horizontal Railing installation instructions (PDF, document TEHR-0720, which states it also applies to Trex Select Railing), and the matching stair instructions in the same document set: the prohibition on notching and on outside-the-rim mounting, the ½ in. carriage bolts and their positions, the blocking requirement, the 2x8 minimum joist, the 6 ft clear span, the stair post positions and the low-speed screw note.
- Trex Decking Installation Guide (PDF): the railing span chart quoted above — 96 in. on centre for Transcend, 72 in. for Select and 96 in. clear span for Signature.
- Ontario — 2024 Building Code: the edition in force, and the source of the metric guard triggers, heights and opening limits summarised on our railings hub.
- City of Toronto — decks and porches: permit thresholds, the drawing content list and the submission route, covered in full on our Toronto deck permits page.
- Composite Deck Shop — railings and fences: the current Ontario range. The live collection is the authority on availability and price.
This guide is practical public information, not engineering advice, a design, or a substitute for the approved drawings. A guard is a life-safety element: your municipality, the Building Code edition in force, and the current instructions for the exact system you buy govern your deck.