Free tool

UK postcode format checker

Type a postcode and see whether it is written correctly, how it should be formatted, and what each part means. Runs in your browser; nothing is stored or sent.

How a UK postcode is built

Every UK postcode has two halves separated by a space. The outward code gets the post to the right delivery office; the inward code gets it to the right street or building.

PartExample in EH2 2NHWhat it is
AreaEHOne or two letters. Roughly a city or region: EH is Edinburgh, LS is Leeds, BS is Bristol.
DistrictEH2The area plus one or two digits, sometimes with a letter, such as SW1A or EC1A. This is the outward code.
SectorEH2 2The district plus the first digit of the inward code. A few thousand addresses.
UnitEH2 2NHThe full postcode. Typically a street, part of a street, or a single large building.

The mistakes we see most in forms

  • Letters for digits. SW1A 0AA typed as SW1A OAA looks almost the same on screen, but with a letter O in place of the zero it is not a postcode. The checker rejects O, I and other letters where a digit belongs.
  • The missing space. EH22NH is fine to type and most systems accept it, but the formatted version always has the space before the last three characters.
  • Lower case. Harmless, but standardise to upper case before storing or printing.
  • Half a postcode. An outward code alone, such as EH2, identifies a district, not an address. It is not valid as a delivery postcode.
  • Letters that never appear. The inward code never uses C, I, K, M, O or V, which is why a postcode ending in 2NO cannot be right.

Checking the format is not the same as finding the address

A format check tells you a postcode could exist. It cannot tell you whether it does, or which addresses are at it, or stop someone typing a perfectly valid postcode for the wrong street. That is what postcode lookup is for: the visitor types their postcode, picks their address from the list, and the form fills itself with a complete, current address.

If you run a WordPress site, that is what BePostcodes does for Gravity Forms, Contact Form 7 and WooCommerce, from £6 a month.

Questions

Does this check that the postcode exists?
No. It checks that the text is shaped like a UK postcode, with a valid outward and inward part. Whether that postcode has addresses at it is a lookup, which is what the BePostcodes plugins do inside a form.
What does a valid UK postcode look like?
One or two letters, one or two digits and sometimes a letter, a space, then a digit and two letters. For example EH2 2NH, LS1 6PU, BS1 5TR or SW1A 1AA. The space is optional when typing but always shown when formatted.
Why is my postcode showing as invalid?
Usually a letter O typed instead of a zero or a letter I instead of a one, a missing character, or a character in the wrong place. The checker shows which part failed so you can compare.
Is anything I type sent anywhere?
No. The check runs in your browser and nothing is sent to BePostcodes or anyone else.