Canada postal code validator

How the postal code format works

Format
Letter-digit-letter digit-letter-digit, alternating letters and numbers
Example
K1A0B1

Things to watch for

  • Format-only check — does not confirm the postal code actually exists
  • Alternating letter/number pattern; normally written with a space before the last 3 characters (e.g. K1A 0B1)
Regex for postal code
^[A-Z][0-9][A-Z][0-9][A-Z][0-9]$

A Canadian postal code is the address code Canada Post uses to route mail, always six characters alternating between letter and digit — for example K1A 0B1, Canada Post’s own Ottawa headquarters and the very first postal code ever issued when the system launched on April 1, 1971. Anyone validating a shipping address, an e-commerce order, or a spreadsheet of Canadian customer records needs the code to be correctly shaped before it’s used downstream.

Because letters and digits must alternate in a fixed pattern, a code with two letters or two digits next to each other in the wrong spot is a common typo that’s easy to miss visually but instantly wrong. Catching that at data entry is cheaper than a shipment routed to the wrong Forward Sortation Area.

How this validator works

This tool checks that the six characters follow the exact letter-digit-letter digit-letter-digit sequence, accepting the code with or without the customary space before the last three characters (e.g. “K1A0B1” or “K1A 0B1”), entirely in your browser with nothing sent to a server.

What a pass doesn’t tell you

Canadian postal codes don’t carry a check digit, so matching the alternating pattern is the most a format check can confirm — not that Canada Post has assigned that exact code to a real address. Confirming that, and seeing which street it maps to, requires Canada Post’s own postal code lookup.

Scope: format validation only — not address lookup, Forward Sortation Area matching, or confirming a code is currently in use.

postal code FAQ

Why do Canadian postal codes alternate letters and numbers?

Canada Post designed the letter-number-letter number-letter-number pattern (A1A 1A1) so the two halves can be told apart at a glance: the first three characters (the Forward Sortation Area) route mail to a general area, and the last three (the Local Delivery Unit) narrow it to a specific street, building, or even one side of a block.

Does the first letter mean anything?

Yes — the first letter groups the postal code into one of Canada's postal districts, roughly one per province or territory (with a few large provinces split across more than one letter). It's a routing hint used by Canada Post, not something this format check relies on beyond confirming a letter is present.

Does a correctly formatted postal code mean it actually exists?

No. This tool only confirms the string follows the alternating letter/digit pattern — it doesn't check the code against Canada Post's actual assignment list. Confirming a postal code is real requires Canada Post's own lookup tool.

← More postal code validators