Keep the street and municipality connected

Canada Post’s addressing guide separates an ordinary civic address into the recipient, delivery-address line, and a line containing municipality, province or territory and postal code. A website may divide that final line into three controls. Map them separately while retaining the relationship between their values.

Keep a supplied unit number with the destination. A province cannot substitute for the municipality, and a postal code copied from another sample does not complete a partially filled address. The field map below uses placeholders rather than a proposed shipping destination.

A field map, not a complete or deliverable address
Street address = [civic number and street from one record]
Unit = [confirmed unit, if assigned]
City = [municipality from that address]
Province / Territory = [matching province or territory]
Postal code = ANA NAN
Country = Canada
A means a letter; N means a digit. ANA NAN is a pattern.

The postal code alternates letters and digits

Canada Post specifies the pattern ANA NAN, where A is a letter and N is a digit. There are six letters and digits, plus a space separating the two groups of three. Store the value as text so that both letters and spacing survive an export.

A form can accept a value’s shape without verifying the destination it represents. For your own application, test lowercase entry and entry without a space against the normalization behavior you intended. Do not turn the code into a number or replace its middle space with a hyphen.

A unit number can appear before the street number

Canada Post permits a unit number before the civic number, separated by a hyphen. In the deliberately incomplete teaching fragment 8-240 [STREET NAME], 8 represents the unit and 240 the street number. This fragment is not a real address. In this arrangement, the postal guidance says to omit an additional unit identifier such as APT.

Other supported arrangements place a unit designation after the street information or put the unit on the line above. Follow the form’s labels and preserve a known unit when assembling the final address. AddressSample does not invent missing units, so use a separately labelled test value when deliberately testing an apartment field.

Preserve province codes and source place names

A Province or Territory control may display a full name while saving its two-letter postal abbreviation. Canada Post places that component after the municipality in a printed address. Check the saved value as well as the label shown in the dropdown.

Do not translate a source place name merely because your interface is in another language. Canada Post’s civic-address guidance specifically distinguishes valid name variants from translating a municipality into a new name. In a multilingual application, inspect accents and other characters after save, reload and export.

Use a sample to check the data flow

In the Canada generator, choose a province or territory and click Generate. Copy the street, locality, region and postal code from that same result. Save it and open Saved addresses, then filter to Canada before downloading CSV or JSON.

Compare the exported postal string and province code with the displayed result. The tool uses a limited snapshot of sourced street and house-number records, combined with fictional profile details. It does not certify postal validity, provide a receiving address or add an apartment number that the source did not supply.

Sources and further reading

Data sources ↗