Last updated
Postal Code Format Reference
- United States: 5 digits (12345) or ZIP+4 (12345-6789)
- Canada: A1A 1A1 (letter-digit-letter space digit-letter-digit)
- United Kingdom: Multiple formats — AN NAA, ANN NAA, ANA NAA, AANN NAA
- Germany: 5 digits (12345)
- France: 5 digits (75001)
- Japan: NNN-NNNN (7 digits with hyphen)
- Australia: 4 digits (2000)
- Netherlands: 4 digits + 2 letters (1234 AB)
- Brazil: NNNNN-NNN (8 digits with hyphen)
Examples
Example 1: US ZIP Code Validation
Input: 90210
Country: US
Result:
Valid: Yes
City: Beverly Hills
State: California (CA)
County: Los Angeles
Time Zone: America/Los_Angeles (UTC-8)
Area Code: 310
ZIP+4 Range: 90210-0001 to 90210-9999
The validator checks not just the format but whether the ZIP code is actually assigned. A code like 00000 matches the 5-digit format but is not a real ZIP code and will be rejected.
Example 2: Canadian Postal Code Validation
Input: K1A 0B1
Country: CA
Result:
Valid: Yes
Province: Ontario (ON)
City: Ottawa
Forward Sortation Area: K1A
Local Delivery Unit: 0B1
Note: This is the postal code for the
House of Commons, Parliament of Canada.
Format: Letter-Digit-Letter Space Digit-Letter-Digit
First letter K = Ontario
Canadian postal codes alternate between letters and digits. The first letter identifies the province — K is Ontario, V is British Columbia, H is Quebec (Montreal area), etc.
Example 3: UK Postcode Validation
Input: SW1A 1AA
Country: GB
Result:
Valid: Yes
Area: SW (South West London)
District: SW1A
Sector: SW1A 1
Unit: SW1A 1AA
City: London
Note: This is the postcode for Buckingham Palace.
Valid UK postcode formats:
SW1A 1AA (AN NAA)
EC1A 1BB (ANA NAA)
W1A 0AX (ANA NAA)
M1 1AE (AN NAA)
B1 1BB (A1 NAA)
CR2 6XH (ANN NAA)
UK postcodes have multiple valid formats reflecting the historical development of the postal system. The validator handles all valid patterns.