NorthMock · Postal fields for developers and QA
Canadian Address Format and Examples for Forms
Use the correct Canada field order, postal syntax, unit handling, and browser autocomplete values when building checkout, CRM, onboarding, and test-data workflows.
Canadian address format at a glance
Canada Post places the municipality, official two-letter province or territory abbreviation, and postal code on the same line. Its mailing convention uses one space between municipality and province, two spaces before the postal code, and an uppercase A1A 1A1 postal pattern with no hyphen.
Format template
[RECIPIENT NAME]
[UNIT]-[CIVIC NUMBER] [STREET NAME] [STREET TYPE]
[MUNICIPALITY] [PROVINCE] [A1A 1A1]
CANADA
Safe format example
TEST USER
4-123 EXAMPLE ST
TORONTO ON M5V 2T6
CANADA
Format-only placeholder: This example is not verified, generated, or offered as a deliverable mailing address.
The country name belongs on its own final line when the item is addressed internationally. In a web form, keep country in a separate field even when it is omitted from the domestic display block.
Map the address into web-form fields
Do not force a complete address into one opaque string when the product needs validation, sorting, tax, shipping, or analytics by component. The autocomplete tokens below follow browser conventions and help users complete familiar fields.
| Form field | Store | Autocomplete | QA expectation |
|---|---|---|---|
| Address line 1 | Street or civic number, street name, and street type | address-line1 | Required for the conventional template |
| Address line 2 | Alternative unit, floor, building, or delivery detail when the UI separates it | address-line2 | Usually optional; never silently discard it |
| Municipality | The approved or represented municipality value | address-level2 | Keep separate from the province or territory |
| Province / territory | Official two-letter code | address-level1 | Show code plus full name in select options |
| Postal code | Uppercase A1A 1A1 display value | postal-code | Use a text input, not a numeric field |
| Country | Canada / CA | country | Use an explicit country value for international forms |
NorthMock API and exports expose address_line, locality, region_code, postal_code, and country_code. An application that collects a separate line 2 should retain and map it according to its own contract.
Canadian address rules that matter in software
Postal code syntax
Use uppercase letter-number-letter, one space, then number-letter-number. The first three characters are the Forward Sortation Area; the last three form the Local Delivery Unit.
Province abbreviations
Use Canada Post's official two-letter code, such as ON, BC, or QC. Do not substitute legacy abbreviations such as Ont. or PQ in a normalized form field.
Units and civic numbers
Canada Post commonly places a unit before the civic number with a hyphen. Applications may collect the unit separately, but they must preserve it when reconstructing the address.
Municipality and country
Keep the municipality separate from the province. Put CANADA on its own final line when addressing from outside Canada; a domestic Canadian form can store country separately.
Basic postal code syntax check
^[A-Z]\d[A-Z] \d[A-Z]\d$
This basic syntax check confirms alternating letters and digits plus the middle space. It does not prove that an FSA belongs to the selected province or that a street is deliverable.
Canadian address-form QA matrix
Test normalization, error messages, copy/paste, export, and persistence independently. A passing pattern check is not evidence that an address exists or receives mail.
| Case | Fixture | Expected behavior |
|---|---|---|
| Standard civic input | TORONTO ON M5V 2T6 | Preserve uppercase letters and the middle postal-code space. |
| Unit-civic input | 4-123 EXAMPLE ST | Keep the unit before the civic number or map it deliberately to line 2. |
| Unspaced postal input | M5V2T6 | Normalize explicitly or return a helpful validation message. |
| Hyphenated postal input | M5V-2T6 | Do not present the hyphen as Canada Post display format. |
| Province/FSA mismatch | Correct syntax but an FSA allocated outside the selected region | Flag the regional mismatch without claiming street deliverability. |
| French or accented locality | Unicode municipality and street text | Preserve characters through UI, API, CSV, and JSON round trips. |
Format, regional consistency, and deliverability are different checks
Syntax validation
Checks character order, separators, length, and allowed codes. It can reject malformed input but cannot identify a specific building.
Regional consistency
Checks whether a postal code or prefix is allocated consistently with the selected province or territory. NorthMock applies this boundary to its regional pools.
Postal validation
Requires current postal reference data and address matching. USPS or Canada Post guidance—not a random generator—defines mailing standards.
Deliverability and occupancy
Require additional, current evidence. A formatted or generated address must never be treated as proof that mail can be delivered or that a person lives there.
Canadian address-format questions
Is the country line required?
Use CANADA on its own final line for international addressing. A domestic display block may omit it, but multi-country applications should still store CA explicitly.
Should postal code values be stored as numbers?
No. Store them as strings. Canadian postal codes contain letters and a space.
Does correct formatting prove the address is valid?
No. Formatting, regional consistency, postal matching, deliverability, and occupancy are separate claims. This guide and NorthMock test records do not prove delivery or residency.
Can I generate a safe test record in this format?
Yes. Open the Canadian address generator, choose a region, and generate one or up to 25 records with separate form fields.
Primary sources and related NorthMock tools
This guide translates postal and public-sector design guidance into practical QA checks. Review the source documents directly when preparing real mail or designing a production address-validation policy.