Postal code formats by country
The shape of a postal code in each country and a regular expression that matches it, for validating address forms. Free CSV, Excel and JSON. Updated 19 November 2026.
About this list
The shape of a postal code in each country and a regular expression that matches it, for validating address forms. In the format, # stands for a digit and @ for a letter. Countries with a blank format have no national postal code system in GeoNames.
201 countries have a postal code format and 51 have none. The most common formats: ##### (70 countries); #### (33 countries); ###### (21 countries); ### (7 countries); #####-#### (5 countries).
Watch out for Namibia: its alpha-2 code is NA, which pandas and many import tools read as a missing value unless you tell them not to.
All 252 countries and territories
| Country | Alpha-2 | Format | Regex |
|---|---|---|---|
| Afghanistan | AF | ||
| Aland Islands | AX | ##### | ^(?:FI)*(\d{5})$ |
| Albania | AL | #### | ^(\d{4})$ |
| Algeria | DZ | ##### | ^(\d{5})$ |
| American Samoa | AS | #####-#### | 96799 |
| Andorra | AD | AD### | ^(?:AD)*(\d{3})$ |
| Angola | AO | ||
| Anguilla | AI | AI-#### | ^(?:AI-)*(\d{4})$ |
| Antarctica | AQ | ||
| Antigua and Barbuda | AG | ||
| Argentina | AR | @####@@@ | ^[A-Z]?\d{4}[A-Z]{0,3}$ |
| Armenia | AM | #### | ^(\d{4})$ |
| Aruba | AW | ||
| Australia | AU | #### | ^(\d{4})$ |
| Austria | AT | #### | ^(\d{4})$ |
| Azerbaijan | AZ | AZ #### | ^(?:AZ )*(\d{4})$ |
| Bahamas | BS | ||
| Bahrain | BH | ####|### | ^(\d{3}\d?)$ |
| Bangladesh | BD | #### | ^(\d{4})$ |
| Barbados | BB | BB##### | ^(?:BB)*(\d{5})$ |
| Belarus | BY | ###### | ^(\d{6})$ |
| Belgium | BE | #### | ^(\d{4})$ |
| Belize | BZ | ||
| Benin | BJ | ||
| Bermuda | BM | @@ ## | ^([A-Z]{2}\d{2})$ |
| Bhutan | BT | ##### | ^(\d{5})$ |
| Bolivia | BO | ||
| Bonaire, Saint Eustatius and Saba | BQ | ||
| Bosnia and Herzegovina | BA | ##### | ^(\d{5})$ |
| Botswana | BW | ||
| Bouvet Island | BV | ||
| Brazil | BR | #####-### | ^\d{5}-\d{3}$ |
| British Indian Ocean Territory | IO | BBND 1ZZ | BBND 1ZZ |
| British Virgin Islands | VG | VG#### | ^(?:VG)*(\d{4})$ |
| Brunei | BN | @@#### | ^([A-Z]{2}\d{4})$ |
| Bulgaria | BG | #### | ^(\d{4})$ |
| Burkina Faso | BF | ||
| Burundi | BI | ||
| Cabo Verde | CV | #### | ^(\d{4})$ |
| Cambodia | KH | ###### | ^(\d{6})$ |
| Cameroon | CM | ||
| Canada | CA | @#@ #@# | ^([ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ]) ?(\d[ABCEGHJKLMNPRSTVWXYZ]\d)$ |
| Cayman Islands | KY | KY#-#### | ^KY\d-\d{4}$ |
| Central African Republic | CF | ||
| Chad | TD | ||
| Chile | CL | ####### | ^(\d{7})$ |
| China | CN | ###### | ^(\d{6})$ |
| Christmas Island | CX | #### | ^(\d{4})$ |
| Cocos Islands | CC | #### | ^(\d{4})$ |
| Colombia | CO | ###### | ^(\d{6})$ |
| Comoros | KM | ||
| Cook Islands | CK | ||
| Costa Rica | CR | ##### | ^(\d{5})$ |
| Croatia | HR | ##### | ^(?:HR)*(\d{5})$ |
| Cuba | CU | CP ##### | ^(?:CP)*(\d{5})$ |
| Curacao | CW | ||
| Cyprus | CY | #### | ^(?:CY-?)*(\d{4})$ |
| Czechia | CZ | ### ## | ^\d{3}\s?\d{2}$ |
| Democratic Republic of the Congo | CD | ####### | ^(\d{7})$ |
| Denmark | DK | #### | ^(\d{4})$ |
| Djibouti | DJ | ##### | ^(\d{5})$ |
| Dominica | DM | ||
| Dominican Republic | DO | ##### | ^(\d{5})$ |
| Ecuador | EC | ###### | ^(\d{6})$ |
| Egypt | EG | ##### | ^(\d{5})$ |
| El Salvador | SV | CP #### | ^(?:CP)*(\d{4})$ |
| Equatorial Guinea | GQ | ||
| Eritrea | ER | ||
| Estonia | EE | ##### | ^(\d{5})$ |
| Eswatini | SZ | @### | ^([A-Z]\d{3})$ |
| Ethiopia | ET | #### | ^(\d{4})$ |
| Falkland Islands | FK | FIQQ 1ZZ | FIQQ 1ZZ |
| Faroe Islands | FO | ### | ^(?:FO)*(\d{3})$ |
| Fiji | FJ | ||
| Finland | FI | ##### | ^(?:FI)*(\d{5})$ |
| France | FR | ##### | ^(\d{5})$ |
| French Guiana | GF | ##### | ^((97|98)3\d{2})$ |
| French Polynesia | PF | ##### | ^((97|98)7\d{2})$ |
| French Southern Territories | TF | ##### | ^(\d{5})$ |
| Gabon | GA | ## | ^(\d{2})$ |
| Gambia | GM | ||
| Georgia | GE | #### | ^(\d{4})$ |
| Germany | DE | ##### | ^(\d{5})$ |
| Ghana | GH | @@-###-####|@@-### | ^([A-Z]{2}-\d{3}(?:-\d{4})?)$ |
| Gibraltar | GI | GX11 1AA | GX11 1AA |
| Greece | GR | ### ## | ^(\d{5})$ |
| Greenland | GL | #### | ^(\d{4})$ |
| Grenada | GD | ||
| Guadeloupe | GP | ##### | ^((97|98)\d{3})$ |
| Guam | GU | 969## | ^(969\d{2})$ |
| Guatemala | GT | ##### | ^(\d{5})$ |
| Guernsey | GG | @# #@@|@## #@@|@@# #@@|@@## #@@|@#@ #@@|@@#@ #@@|GIR0AA | ^((?:(?:[A-PR-UWYZ][A-HK-Y]\d[ABEHMNPRV-Y0-9]|[A-PR-UWYZ]\d[A-HJKPS-UW0-9])\s\d[ABD-HJLNP-UW-Z]{2})|GIR\s?0AA)$ |
| Guinea | GN | ### | ^(\d{3})$ |
| Guinea-Bissau | GW | #### | ^(\d{4})$ |
| Guyana | GY | ####### | ^(\d{7})$ |
| Haiti | HT | HT#### | ^(?:HT)*(\d{4})$ |
| Heard Island and McDonald Islands | HM | #### | ^(\d{4})$ |
| Honduras | HN | ##### | ^(\d{6})$ |
| Hong Kong | HK | ###### | ^(\d{6})$ |
| Hungary | HU | #### | ^(\d{4})$ |
| Iceland | IS | ### | ^(\d{3})$ |
| India | IN | ###### | ^(\d{6})$ |
| Indonesia | ID | ##### | ^(\d{5})$ |
| Iran | IR | ########## | ^(\d{10})$ |
| Iraq | IQ | ##### | ^(\d{5})$ |
| Ireland | IE | @@@ @@@@ | ^(D6W|[AC-FHKNPRTV-Y][0-9]{2})\s?([AC-FHKNPRTV-Y0-9]{4}) |
| Isle of Man | IM | @# #@@|@## #@@|@@# #@@|@@## #@@|@#@ #@@|@@#@ #@@|GIR0AA | ^((?:(?:[A-PR-UWYZ][A-HK-Y]\d[ABEHMNPRV-Y0-9]|[A-PR-UWYZ]\d[A-HJKPS-UW0-9])\s\d[ABD-HJLNP-UW-Z]{2})|GIR\s?0AA)$ |
| Israel | IL | ####### | ^(\d{7}|\d{5})$ |
| Italy | IT | ##### | ^(\d{5})$ |
| Ivory Coast | CI | ||
| Jamaica | JM | ||
| Japan | JP | ###-#### | ^\d{3}-\d{4}$ |
| Jersey | JE | @# #@@|@## #@@|@@# #@@|@@## #@@|@#@ #@@|@@#@ #@@|GIR0AA | ^((?:(?:[A-PR-UWYZ][A-HK-Y]\d[ABEHMNPRV-Y0-9]|[A-PR-UWYZ]\d[A-HJKPS-UW0-9])\s\d[ABD-HJLNP-UW-Z]{2})|GIR\s?0AA)$ |
| Jordan | JO | ##### | ^(\d{5})$ |
| Kazakhstan | KZ | ###### | ^(\d{6})$ |
| Kenya | KE | ##### | ^(\d{5})$ |
| Kiribati | KI | @@#### | ^([A-Z]{2}\d{4})$ |
| Kosovo | XK | ##### | ^(\d{5})$ |
| Kuwait | KW | ##### | ^(\d{5})$ |
| Kyrgyzstan | KG | ###### | ^(\d{6})$ |
| Laos | LA | ##### | ^(\d{5})$ |
| Latvia | LV | LV-#### | ^(?:LV)*(\d{4})$ |
| Lebanon | LB | #### ####|#### | ^(\d{4}(\d{4})?)$ |
| Lesotho | LS | ### | ^(\d{3})$ |
| Liberia | LR | #### | ^(\d{4})$ |
| Libya | LY | ||
| Liechtenstein | LI | 94## | ^((94\d{2}))$ |
| Lithuania | LT | LT-##### | ^(?:LT)*(\d{5})$ |
| Luxembourg | LU | L-#### | ^(?:L-)?\d{4}$ |
| Macao | MO | ###### | ^(\d{6})$ |
| Madagascar | MG | ### | ^(\d{3})$ |
| Malawi | MW | ###### | ^(\d{6})$ |
| Malaysia | MY | ##### | ^(\d{5})$ |
| Maldives | MV | ##### | ^(\d{5})$ |
| Mali | ML | ||
| Malta | MT | @@@ #### | ^[A-Z]{3}\s?\d{4}$ |
| Marshall Islands | MH | #####-#### | ^969\d{2}(-\d{4})$ |
| Martinique | MQ | ##### | ^(\d{5})$ |
| Mauritania | MR | ||
| Mauritius | MU | ##### | ^(\d{5})$ |
| Mayotte | YT | ##### | ^(\d{5})$ |
| Mexico | MX | ##### | ^(\d{5})$ |
| Micronesia | FM | ##### | ^(\d{5})$ |
| Moldova | MD | MD-#### | ^MD-\d{4}$ |
| Monaco | MC | ##### | ^(\d{5})$ |
| Mongolia | MN | ##### | ^(\d{5})$ |
| Montenegro | ME | ##### | ^(\d{5})$ |
| Montserrat | MS | MSR#### | ^(?:MSR)*(\d{4})$ |
| Morocco | MA | ##### | ^(\d{5})$ |
| Mozambique | MZ | #### | ^(\d{4})$ |
| Myanmar | MM | ##### | ^(\d{5})$ |
| Namibia | NA | ##### | ^(\d{5})$ |
| Nauru | NR | NRU68 | NRU68 |
| Nepal | NP | ##### | ^(\d{5})$ |
| Netherlands Antilles | AN | ||
| New Caledonia | NC | ##### | ^(\d{5})$ |
| New Zealand | NZ | #### | ^(\d{4})$ |
| Nicaragua | NI | ##### | ^(\d{5})$ |
| Niger | NE | #### | ^(\d{4})$ |
| Nigeria | NG | ###### | ^(\d{6})$ |
| Niue | NU | #### | ^(\d{4})$ |
| Norfolk Island | NF | #### | ^(\d{4})$ |
| North Korea | KP | ###-### | ^(\d{6})$ |
| North Macedonia | MK | #### | ^(\d{4})$ |
| Northern Mariana Islands | MP | ##### | ^9695\d{1}$ |
| Norway | NO | #### | ^(\d{4})$ |
| Oman | OM | ### | ^(\d{3})$ |
| Pakistan | PK | ##### | ^(\d{5})$ |
| Palau | PW | 96940 | ^(96940)$ |
| Palestinian Territory | PS | P#######|P### | ^(P\d{7}|P\d{3})$ |
| Panama | PA | ##### | ^(\d{5})$ |
| Papua New Guinea | PG | ### | ^(\d{3})$ |
| Paraguay | PY | ###### | ^(\d{6})$ |
| Peru | PE | ##### | ^(\d{5})$ |
| Philippines | PH | #### | ^(\d{4})$ |
| Pitcairn | PN | PCRN 1ZZ | PCRN 1ZZ |
| Poland | PL | ##-### | ^\d{2}-\d{3}$ |
| Portugal | PT | ####-### | ^\d{4}-\d{3}\s?[a-zA-Z]{0,25}$ |
| Puerto Rico | PR | #####-#### | ^00[679]\d{2}(?:-\d{4})?$ |
| Qatar | QA | ||
| Republic of the Congo | CG | ||
| Reunion | RE | ##### | ^((97|98)(4|7|8)\d{2})$ |
| Romania | RO | ###### | ^(\d{6})$ |
| Russia | RU | ###### | ^(\d{6})$ |
| Rwanda | RW | ||
| Saint Barthelemy | BL | ##### | ^(\d{5})$ |
| Saint Helena | SH | STHL 1ZZ | ^(STHL1ZZ)$ |
| Saint Kitts and Nevis | KN | KN#### | ^(?:KN)*(\d{4})$ |
| Saint Lucia | LC | LC###-### | ^LC\d{3}-\d{3}$ |
| Saint Martin | MF | ##### | ^(\d{5})$ |
| Saint Pierre and Miquelon | PM | ##### | ^(97500)$ |
| Saint Vincent and the Grenadines | VC | VC#### | ^(?:VC)*(\d{4})$ |
| Samoa | WS | AS 96799 | AS 96799 |
| San Marino | SM | 4789# | ^(4789\d)$ |
| Sao Tome and Principe | ST | ||
| Saudi Arabia | SA | ##### | ^(\d{5})$ |
| Senegal | SN | ##### | ^(\d{5})$ |
| Serbia | RS | ##### | ^(\d{5})$ |
| Serbia and Montenegro | CS | ##### | ^(\d{5})$ |
| Seychelles | SC | ||
| Sierra Leone | SL | ||
| Singapore | SG | ###### | ^(\d{6})$ |
| Sint Maarten | SX | ||
| Slovakia | SK | ### ## | ^\d{3}\s?\d{2}$ |
| Slovenia | SI | #### | ^(?:SI)*(\d{4})$ |
| Solomon Islands | SB | ||
| Somalia | SO | @@ ##### | ^([A-Z]{2}\d{5})$ |
| South Africa | ZA | #### | ^(\d{4})$ |
| South Georgia and the South Sandwich Islands | GS | SIQQ 1ZZ | SIQQ 1ZZ |
| South Korea | KR | ##### | ^(\d{5})$ |
| South Sudan | SS | ||
| Spain | ES | ##### | ^(\d{5})$ |
| Sri Lanka | LK | ##### | ^(\d{5})$ |
| Sudan | SD | ##### | ^(\d{5})$ |
| Suriname | SR | ||
| Svalbard and Jan Mayen | SJ | #### | ^(\d{4})$ |
| Sweden | SE | ### ## | ^(?:SE)?\d{3}\s\d{2}$ |
| Switzerland | CH | #### | ^(\d{4})$ |
| Syria | SY | ||
| Taiwan | TW | ##### | ^(\d{5})$ |
| Tajikistan | TJ | ###### | ^(\d{6})$ |
| Tanzania | TZ | ##### | ^(\d{5})$ |
| Thailand | TH | ##### | ^(\d{5})$ |
| The Netherlands | NL | #### @@ | ^(\d{4}\s?[a-zA-Z]{2})$ |
| Timor Leste | TL | TL##### | ^(?:TL)*(\d{5})$ |
| Togo | TG | ||
| Tokelau | TK | ||
| Tonga | TO | ||
| Trinidad and Tobago | TT | ###### | ^(\d{6})$ |
| Tunisia | TN | #### | ^(\d{4})$ |
| Turkey | TR | ##### | ^(\d{5})$ |
| Turkmenistan | TM | ###### | ^(\d{6})$ |
| Turks and Caicos Islands | TC | TKCA 1ZZ | ^(TKCA 1ZZ)$ |
| Tuvalu | TV | ||
| U.S. Virgin Islands | VI | #####-#### | ^008\d{2}(?:-\d{4})?$ |
| Uganda | UG | ##### | ^(\d{5})$ |
| Ukraine | UA | ##### | ^(\d{5})$ |
| United Arab Emirates | AE | ##### ##### | ^\d{5}-\d{5}$ |
| United Kingdom | GB | @# #@@|@## #@@|@@# #@@|@@## #@@|@#@ #@@|@@#@ #@@|GIR0AA | ^([Gg][Ii][Rr]\s?0[Aa]{2})|((([A-Za-z][0-9]{1,2})|(([A-Za-z][A-Ha-hJ-Yj-y][0-9]{1,2})|(([A-Za-z][0-9][A-Za-z])|([A-Za-z][A-Ha-hJ-Yj-y][0-9]?[A-Za-z]))))\s?[0-9][A-Za-z]{2})$ |
| United States | US | #####-#### | ^\d{5}(-\d{4})?$ |
| United States Minor Outlying Islands | UM | ||
| Uruguay | UY | ##### | ^(\d{5})$ |
| Uzbekistan | UZ | ###### | ^(\d{6})$ |
| Vanuatu | VU | ||
| Vatican | VA | ##### | ^(\d{5})$ |
| Venezuela | VE | #### | ^(\d{4})$ |
| Vietnam | VN | ###### | ^(\d{6})$ |
| Wallis and Futuna | WF | ##### | ^(986\d{2})$ |
| Western Sahara | EH | ##### | ^(\d{5})$ |
| Yemen | YE | ||
| Zambia | ZM | ##### | ^(\d{5})$ |
| Zimbabwe | ZW |
No row matches. Clear the filter to see all.
Source: GeoNames countryInfo, CC BY 4.0, retrieved 19 November 2026. File: postal-code-formats.csv
Use it
import re, csv
rx = {r["iso_alpha2"]: r["postal_code_regex"] for r in csv.DictReader(open("postal-code-formats.csv")) if r["postal_code_regex"]}
print(bool(re.match(rx["CA"], "K1A0B1"))) # Canada → TrueData dictionary
| Column | Type | Meaning |
|---|---|---|
| country | text | Country |
| iso_alpha2 | text | Alpha-2 |
| postal_code_format | text | Format |
| postal_code_regex | text | Regex |