You need a deck gate because your toddler just figured out how to open the sliding door, or your dog keeps trying to jump off the elevated deck. Here's what Ontario Building Code requires, what actually works, and what you'll pay.

Ontario Building Code Requirements for Deck Gates

The Ontario Building Code (OBC) doesn't specifically mandate gates on elevated decks, but it does require guardrails on any deck more than 24 inches (610 mm) above grade. If you have young children or pets, a gate becomes a practical necessity even if code doesn't force it.

Here's what OBC Section 9.8.8 says about guardrail openings, which applies to gates too:

If you're installing a gate, it must meet the same height and spacing requirements as the rest of your guardrail system. A gate with 6-inch gaps between balusters fails code, even if the rest of your railing is compliant.

Child-Safety Latch Requirements

OBC doesn't specify latch mechanisms for residential deck gates, but municipal building departments in Kitchener, Waterloo, and Cambridge often recommend self-closing, self-latching gates for elevated decks with young children. Some inspectors will note this on your permit approval.

For pools, the rules are stricter. If your deck surrounds or provides access to a pool, Ontario's Pool Enclosure Regulation (O. Reg. 565/17) requires:

Even if you don't have a pool, using a high-mounted latch (48-54 inches) is smart for toddler safety.

Types of Deck Gates for Ontario Homes

Wood Picket Gate

Best for: Matching existing pressure-treated or cedar railings

Wood gates blend seamlessly with traditional deck railings. You can build one yourself or have it custom-made by your deck builder.

Typical cost (2026):

Pros:

Cons:

Use a diagonal brace running from the bottom hinge side to the top latch side. This prevents sagging. Without it, most wood gates sag within 2-3 years.

Aluminum or Metal Gate

Best for: Low maintenance, modern or contemporary decks

Pre-manufactured aluminum gates match aluminum railing systems from brands like Westbury, Fortress, or RDI. Most use powder-coated aluminum that won't rust in Ontario's freeze-thaw cycles.

Typical cost (2026):

Pros:

Cons:

Aluminum gates work well in Ontario winters. Unlike steel, they won't corrode from road salt tracked onto the deck.

Vinyl or Composite Gate

Best for: Homeowners with vinyl or composite railing systems

Vinyl gates match vinyl railing systems. Most are reinforced with aluminum inserts to prevent sagging.

Typical cost (2026):

Pros:

Cons:

If you have a Trex, TimberTech, or Azek deck with matching railings, get the gate from the same manufacturer. Mixing brands often means mismatched colors.

Chain-Link or Pet Gate (Temporary)

Best for: Seasonal use or renters

Pressure-mounted or hardware-mounted pet gates work for low decks or temporary barriers. These are not OBC-compliant for elevated decks but can work for ground-level patios or as a secondary barrier at deck stairs.

Typical cost (2026):

Pros:

Cons:

Use these for deck stairs leading to the yard, not as the primary barrier on an elevated deck.

Gate Width and Swing Direction

Standard Gate Width

Most deck gates are 36 to 42 inches wide. This allows an adult to pass through comfortably while carrying a lawn chair or cooler.

If you need wheelchair or mobility device access, install a 42-inch minimum clear opening (measured when the gate is fully open). This matches Ontario's accessibility guidelines for residential outdoor spaces.

Swing Direction

Gates should swing inward toward the deck, not outward toward the stairs. Here's why:

If your deck surrounds a pool, Ontario law requires the gate to swing outward (away from the pool). This prevents a child from being trapped between the gate and the pool.

For a deck with stairs on one side and a pool on the other, you may need two gates with opposite swing directions.

Latch Options for Child and Pet Safety

Self-Closing Hinges

Self-closing spring hinges automatically pull the gate shut after you walk through. Most are adjustable, so you can control closing speed.

Cost: $20-40 per pair (2026)

Install these if you have toddlers or dogs who dash for open gates. They're also required for pool enclosures in Ontario.

Gravity Latch

A gravity latch uses a weighted arm that drops into a catch when the gate closes. Simple and reliable.

Cost: $10-20 (2026)

Pros:

Cons:

Magnetic Latch

Magnetic latches use strong magnets to hold the gate closed. Common on aluminum gate kits.

Cost: $15-30 (2026)

Pros:

Cons:

Key-Lockable Latch

For pools or if you want to lock the deck when you're away, use a latch with a keyed lock.

Cost: $30-60 (2026)

Ontario pool enclosure rules don't require locks, but they do require that latches are mounted high (54 inches minimum). A lockable latch adds a second layer of security.

Slide Bolt (Top-Mounted)

A simple slide bolt mounted 48-54 inches above the deck surface keeps toddlers out but allows adults easy access.

Cost: $8-15 (2026)

Pros:

Cons:

Installation Tips for Ontario Climate

Use Stainless Steel or Galvanized Hardware

Standard hinges and latches rust quickly in Ontario's wet spring and salty winter conditions. Use:

Budget an extra $20-40 for weather-resistant hardware. It lasts 10+ years instead of 2-3.

Pre-Drill All Screw Holes

Pressure-treated lumber and hardwoods like cedar split easily when screws are driven near edges. Pre-drill every screw hole with a bit slightly smaller than the screw shaft.

This is especially important for hinge screws, which take a lot of stress.

Install a Stop Block

A stop block is a small piece of wood or metal attached to the gate frame that prevents the gate from swinging past vertical. Without one, the gate slams into the railing post and damages the latch over time.

Most pre-manufactured gates include a stop block. If you're building your own, add one on the latch side.

Test Self-Closing Force

Ontario pool regulations require self-closing gates to latch from any open position. After installation, open the gate halfway and let go. It should close completely and latch without help.

Adjust the spring tension on self-closing hinges until the gate closes reliably but isn't so stiff that adults struggle to open it.

Winter Maintenance

Freeze-thaw cycles can warp wood gates and seize metal latches. Before winter:

If your gate freezes shut, don't force it. Pour lukewarm (not boiling) water on the latch to melt ice buildup.

Do You Need a Permit for a Deck Gate?

No. Adding a gate to an existing code-compliant deck does not require a building permit in Kitchener, Waterloo, or Cambridge.

However, if you're building a new deck or replacing guardrails, the entire railing system (including the gate) must be shown on your deck permit drawings and inspected during the framing inspection.

Inspectors check:

If you're adding a gate to a deck that was built without a permit, the gate itself won't trigger an inspection—but if the deck doesn't meet current OBC standards, you could face enforcement issues later. Read more about deck permit requirements in Kitchener, Waterloo, or Cambridge.

DIY vs. Professional Installation

DIY Gate Installation

If you're comfortable with basic carpentry, you can install a pre-hung gate in 1-2 hours. You'll need:

Cost: $100-200 for materials, assuming you already have tools.

Building a custom wood gate from scratch takes more skill. You need to cut a diagonal brace, ensure square corners, and match the existing baluster spacing. Budget 4-6 hours if you've never built a gate before.

Hiring a Pro

Deck builders and fence contractors install gates regularly. Professional installation ensures:

Cost: $100-250 for installation on top of gate materials (2026).

Get quotes from the same contractor who built your deck. They already know your railing system and have matching materials on hand. You can also request a gate quote when getting estimates for deck railings.

Common Questions

What's the best gate for a deck with a small dog?

Use a gate with 4-inch maximum spacing between balusters (OBC compliant) and a gravity or magnetic latch that engages automatically. Small dogs can push through loose latches but won't open a properly latched gate. If your dog is a jumper, make sure the gate matches your guardrail height (36 inches minimum).

Can I install a gate on composite railing?

Yes, but buy the gate from the same manufacturer as your railing system. Trex, TimberTech, and Azek all make matching gate kits designed to attach to their post sleeves. Mixing brands often means mismatched colors and incompatible mounting hardware. Expect to pay $250-450 for a composite gate kit in 2026.

How do I stop my wood gate from sagging?

Install a diagonal brace running from the bottom of the hinge side to the top of the latch side. Use a 2x4 or 2x6 for the brace and attach it with 3-inch deck screws. If the gate has already sagged, remove it, prop it on blocks to restore square, add the brace, and rehang it. Most wood gates without diagonal bracing sag within 2-3 years.

Do I need a gate if my deck is only 18 inches off the ground?

Ontario Building Code doesn't require guardrails (or gates) on decks less than 24 inches (610 mm) above grade. However, if you have toddlers or pets, a low gate at the deck stairs prevents unsupervised access to the yard. Use a simple hardware-mounted pet gate for $80-150 instead of a full code-compliant gate.

Can I use a baby gate on my deck?

Not as a primary barrier on an elevated deck. Indoor baby gates and pressure-mounted pet gates don't meet OBC guardrail requirements. They're fine for temporary use at the top of deck stairs or on ground-level patios, but they won't pass a building inspection and won't stop a determined climber. For elevated decks, install a properly anchored gate that matches your railing system.

🎨
See what your deck could look like

Upload a backyard photo and preview real decking materials with AI — free, instant, no sign-up.

Try PaperPlan free →

Planning a deck? Get 1–3 quotes from vetted local builders — free, no pressure.

Get free quotes →