Canadian postal code validator
Type or paste a postal code. You see whether the format is valid, the tidy A1A 1A1 version, and the region of its first letter.
Free · no signup Runs in your browser
What is the format of a Canadian postal code?
A Canadian postal code has the form ANA NAN, where A is a letter and N is a digit, with a space in the middle, for example K1A 0B1. The letters D, F, I, O, Q and U are never used, and W and Z are not used as the first letter. The first letter identifies the province or region. A code with a valid format may still not exist.
Why this validator exists
A form that rejects 'K1A0B1' or accepts 'K1A 0O1' is usually applying the wrong rule. This tool checks the pattern the way Canada Post defines it, including the six letters that never appear, and tells you which part of a code is wrong when it fails.
It checks the format only. A code can have a perfectly valid format and still not be assigned, and this page cannot look codes up because it works offline in your browser. For measuring and converting everyday units see the price per kg to lb calculator.
It runs in your browser. Nothing you enter is sent anywhere, and there is no sign-up.
How it works
A Canadian postal code has the form ANA NAN, where A is a letter and N is a digit, with a space in the middle, for example K1A 0B1. The validator checks the pattern and the Canada Post letter rules: D, F, I, O, Q and U are never used, W and Z are not used as the first letter, and the first letter must be one of the 18 that Canada Post lists (A B C E G H J K L M N P R S T V X Y). The second character is 0 for rural delivery or 1 to 9 for urban. The first three characters are the forward sortation area and the last three the local delivery unit. W and Z are excluded only from the first position, which is why the other two letter positions still accept them. The tool checks the format only: it cannot tell whether a code is assigned to a real address.
How to use it
- Type or paste the postal code, with or without the space.
- Read whether the format is valid.
- Read why a code fails: a letter that is never used, a wrong first letter or the wrong pattern.
- Use the first letter to see the province or region it belongs to.
- Check a real address with Canada Post if you need to know the code exists.
What the calculation assumes
What goes into the answer, and what does not.
| Aspect | What happens |
|---|---|
| The code | Not changed: the tool tidies the spacing and capital letters in the result |
| Format rules | Pattern ANA NAN with the letters Canada Post allows |
| Existence | Not checked: a valid format does not mean the code is in use |
| Province | Shown from the first letter |
| Addresses | Not looked up |
| Privacy | Everything is worked out in your browser; nothing you enter is uploaded or saved |
When to use it
- Checking an address before you send a form
- Cleaning up a list of codes typed with and without spaces
- Finding out why a form rejects your code
- Working out the region from the first letter
Problems you may run into
Most differences come from the inputs and from the meaning of the numbers.
| What you see | Likely cause | What to do |
|---|---|---|
| A real code is rejected | A typo, or an O typed instead of a zero | Check the digits and letters against the letter rules |
| A valid code does not exist | Only the format is checked | Use Canada Post's lookup for real addresses |
| The code has no space | The tool accepts it with or without the space | Add the space in the middle when you write it |
| Lower-case letters | Postal codes are written in capitals | The tool accepts both |
| A US ZIP code | That has a different format | This tool is for Canadian codes |
Mistakes it helps you avoid
- Using the letter O instead of the number 0, or I instead of 1.
- Typing a letter that is never used in postal codes: D, F, I, O, Q or U.
- Starting a code with W or Z.
- Missing or extra characters.
How a postal code is checked
The format is letter, digit, letter, a space, digit, letter, digit.
pattern : A N A N A N (A = letter, N = digit)never used : D F I O Q Ufirst letter : not W, not Z; one of A B C E G H J K L M N P R S T V X Ysecond char : 0 = rural delivery, 1 to 9 = urbanregex : ^[ABCEGHJ-NPRSTVXY]\d[ABCEGHJ-NPRSTV-Z] ?\d[ABCEGHJ-NPRSTV-Z]\d$
The first three characters are the forward sortation area and the last three the local delivery unit. Canada Post lists 18 first letters. W and Z are excluded only from the first position, which is why the other two letter positions in the pattern still accept them.
Worked example: k1a0b1
Someone types a code in lower case with no space: k1a0b1.
- Convert to upper case and remove spacesK1A0B1
- Pattern letter, digit, letter, digit, letter, digitvalid
- Letters D F I O Q U present?none
- First letter KEastern Ontario
- Second character 1urban
- FormattedK1A 0B1
K1A 0B1 has a valid format and starts in Eastern Ontario.
Valid format is not the same as an existing code. This tool cannot confirm that a code is in service.
Terms on this page
- FSA
- Forward sortation area, the first three characters of a postal code.
- LDU
- Local delivery unit, the last three characters.
Common questions
What letters are not used in Canadian postal codes?
D, F, I, O, Q and U. W and Z also cannot be the first letter, according to Canada Post's Postal Code Conversion File reference guide.
Does a Canadian postal code have a space?
It is written ANA NAN with a space between the first three and last three characters.
What does the first letter mean?
It identifies one of 18 major geographic areas, provinces or districts, for example M for Metropolitan Toronto, V for British Columbia and X for the Northwest Territories and Nunavut.
What does a 0 in the second position mean?
A zero as the second character marks a rural code, as in A0A. Codes 1 to 9 in that position are urban.
Does a valid format mean the postal code exists?
No. This tool only checks the pattern. It cannot tell whether Canada Post has assigned the code.
Where these numbers come from
- Canada Post — Addressing guidelines: Postal codes The ANA NAN form, the 18 first letters and urban and rural codes.
- Statistics Canada and Canada Post — Postal Code Conversion File Reference Guide Letters excluded from postal codes, release of December 15, 2020.
Last verified 2026-10-23 The method on this page is checked against the sources above at least once a year. Spotted something out of date? Tell us and we will fix it.
Related calculators
Price per kg to lb
Compare shelf prices when one is per kilogram and the other is per pound.
Open calculatorWind chill
The Environment Canada wind chill index, with frostbite risk and the exposure times behind it.
Open calculatorHumidex
Canada's own heat index, from temperature and either dewpoint or relative humidity.
Open calculatorL/100 km to mpg
Convert fuel economy between litres per 100 km, imperial mpg and US mpg, and see the fuel and cost for a trip.
Open calculatorTrip fuel cost calculator
Work out the fuel cost of a drive from the distance, your fuel use and today's price per litre, round trip or one way, and split it between riders.
Open toolPassport photo checker
Check a photo's size, face size, file size and date against IRCC's passport photo rules, for print and online renewal.
Open calculator✨ Everyday and leisure calculators
The small calculations that come up in a kitchen, a supermarket aisle or a games session.
See all 26 calculators in this section