GUIDE
How to Parse Canadian Addresses
The complete guide. Every edge case. Every format.
Why Canadian address parsing is hard
Canadian addresses look simple until you try to parse them programmatically. "55 Catherine St, St Catharines, ON" has "St" appearing twice with completely different meanings. "North York" looks like a direction plus a city name but it's actually a single city. "STN" means "suite" in one context and "postal station" in another.
This guide covers every pattern and edge case you'll encounter when parsing Canadian mailing addresses, whether you're building a parser from scratch or evaluating tools.
Canadian address structure
A standard Canadian address has these components:
- Unit/Suite (optional): APT 5, SUITE 200, UNIT 3B, TH 12
- Street number: 161
- Street name: BAY, QUEEN, YONGE
- Street type: ST, AVE, BLVD, DR, RD, CRES
- Street direction (optional): N, S, E, W, NE, NW
- City: TORONTO, OTTAWA, VANCOUVER
- Province: ON, BC, AB (2-letter code)
- Postal code: M5V 2T6 (alpha-numeric-alpha space numeric-alpha-numeric)
But real-world data rarely comes this clean. You'll encounter PO Boxes, rural routes, building names, ATTN lines, C/O lines, and everything jammed into a single column.
The "ST" problem: Street vs Saint
This is the single most common parsing error in Canadian addresses.
55 CATHERINE ST ST CATHARINES ON L2R 5C9
First "ST" = Street (type for Catherine)
Second "ST" = Saint (part of city name St Catharines)
Similar ambiguities: ST JOHN'S (NL), ST ALBERT (AB), ST THOMAS (ON). The rule: if "ST" appears before a known city name, it means Saint. If it appears after a street name, it means Street.
Multi-word cities
Canada has hundreds of multi-word city names that trip up parsers. A naive parser splitting on spaces will turn "NORTH YORK" into direction=NORTH, city=YORK.
Common multi-word cities you must handle:
Note: NORTH YORK, EAST YORK, SCARBOROUGH, and ETOBICOKE are former municipalities now part of Toronto. They appear as city names in mailing addresses even though they're technically Toronto neighborhoods.
PO Boxes, rural routes, and delivery modes
Non-street delivery addresses in Canada include:
- PO BOX: PO BOX 61 STN MAIN TORONTO ON M5V 2T6
- Rural Route: RR 1 SHARBOT LAKE ON K0H 2P0
- General Delivery: GD BANCROFT ON K0L 1C0
- RPO (Retail Postal Outlet): PO BOX 300 RPO WESTDALE HAMILTON ON
Critical rule: preserve the FULL delivery identifier. "PO BOX 61 STN MAIN" is the complete delivery info. Truncating to just "PO BOX" means mail won't be delivered to the right station.
The "STN" problem
"STN" changes meaning depending on context:
PO BOX 61 STN MAIN TORONTO ON
STN = postal station (Station Main)
4900 YONGE ST STN 5 NORTH YORK ON
STN = suite/unit designator (Suite 5)
55 STN RD BELLEVILLE ON
STN = part of street name (Station Road)
Rule: STN after PO BOX or RR = postal station. STN followed by a number in a street address = unit. STN followed by a word like RD, ST, AVE = part of street name.
Building names and ATTN/C/O lines
Commercial addresses often include building names, attention lines, and care-of designations before the actual street address:
ATTN PROPERTY MANAGER
BROOKFIELD PLACE TD CANADA TRUST TOWER
161 BAY ST 27TH FLOOR
TORONTO ON M5J 2S1
Each component needs its own column: ATTN, ADDRESS_INFO (building name), STREET_NUMBER, STREET_NAME, STREET_TYPE, UNIT, CITY, PROVINCE, POSTAL_CODE.
The easy way: let SortStack handle it
Building a Canadian address parser from scratch means handling all of the above, plus hundreds of additional edge cases. Or you can upload your file to SortStack and have it parsed in 60 seconds with 100% accuracy.
SortStack was built by actually parsing over 5,000 real Canadian addresses from property assessment rolls. Every edge case in this guide was encountered, solved, and built into our parsing engine.