UK Address Validator & Postcode Checker

This validates format, not deliverability. It cannot confirm that a property exists or receives post — that needs a licensed Royal Mail Postcode Address File (PAF) service. This site is independent and is not affiliated with Royal Mail Group.

Paste a UK address or a postcode and see exactly which rule it breaks: the structural format of the postcode, the Royal Mail line order, and whether the postcode district belongs to the post town written on the address. Errors and warnings are reported separately, so a well-formed address with an unexpected post town is never confused with an invalid one.

What this validator checks — and what it cannot

This is a format validator. It reads an address, finds the postcode, tests that postcode against the Royal Mail structural rules, cross-checks the postcode district against the post town, and rewrites the address in the Royal Mail layout. Everything it reports can be determined from the text you paste plus the postcode district registry behind this site.

CheckWhat it answersHow
Postcode structureIs this a well-formed UK postcode?Tested against the six permitted formats and the letters excluded at each position.
Postcode componentsWhat are its area, district, sector and unit?Split at the inward/outward boundary, three characters from the end.
District to post townDoes the district belong to the town written on the address?Looked up in the curated district registry; reported as a warning, not an error.
Address layoutAre the lines in the Royal Mail order, with the post town in capitals?The input is re-emitted in the "Clear Addressing" layout for comparison.
Required elementsIs a building number or name present, and a postcode?Absence of a postcode is an error; a missing building identifier is a warning.

It cannot tell you whether a property exists, whether anyone lives there, or whether post sent to it would arrive. Nothing on this page performs a delivery-point lookup.

Format validation is not address verification

These two jobs are routinely confused, and confusing them is how address forms end up rejecting real addresses. They answer different questions and need different data.

Format validation (what this page does)
Is the address written correctly? Does the postcode obey the structural rules? Are the lines in the right order? This needs only the published grammar of the postcode system, so it can run offline, in your own code, for free.
Address verification (what this page does not do)
Does this delivery point exist, and will post reach it? This requires the Royal Mail Postcode Address File (PAF), a licensed commercial dataset of every deliverable address in the United Kingdom. Access is sold through Royal Mail and its resellers; there is no free, complete, lawful copy of it.

If your requirement is "the customer must have typed a real address that we can post to", you need a licensed PAF provider and you should budget for it. If your requirement is "reject obvious typos before we submit the form", format validation is the right tool and is what most forms actually need.

A well-formed postcode that is not currently allocated is the case that catches people out. "M20 9ZZ" passes every structural rule and is not a real delivery point. A format validator will accept it, correctly, and only PAF data can reject it.

The rules a UK postcode has to obey

A postcode is an outward code and an inward code separated by one space. The inward code is always exactly three characters — one digit then two letters — which is why the space always sits three characters from the end, whatever the total length.

FormatExampleWhere it is used
A9 9AAM1 1AESingle-letter area, single-digit district
A99 9AAB33 8THSingle-letter area, two-digit district
A9A 9AAW1A 0AXSingle-letter area with a lettered district
AA9 9AACR2 6XHTwo-letter area, single-digit district
AA99 9AADN55 1PTTwo-letter area, two-digit district
AA9A 9AAEC1A 1BBTwo-letter area with a lettered district

Beyond the shape, certain letters are excluded at certain positions — a rule the commonly copy-pasted "official" regex omits, which is why so many hand-rolled validators accept postcodes that Royal Mail never issues.

First position
Never Q, V or X.
Second position
Never I, J or Z.
Third position (when it is a letter)
One of A, B, C, D, E, F, G, H, J, K, P, S, T, U, W.
Fourth position (when it is a letter)
One of A, B, E, H, M, N, P, R, V, W, X, Y.
The final two letters
Never C, I, K, M, O or V — the letters most easily misread by hand or by a scanner.

One postcode breaks the pattern entirely and is still valid: GIR 0AA, issued to the former National Girobank in Bootle. Any validator that rejects it is wrong, and this one accepts it as a named special case.

What each failure message means

The validator separates errors from warnings, because "this cannot be a valid address" and "this is well formed but looks wrong" call for different handling in a form. Errors are worth blocking on. Warnings are worth surfacing to the person typing, and never worth blocking on.

No postcode found
An error. Nothing in the input matched the shape of a UK postcode, so there was nothing to validate. Check for a missing line break or a comma swallowing the last line.
Too short, or too long
An error. Excluding the space, every UK postcode is between five and seven characters. A six-character entry with the space in the wrong place is usually a paste error.
The inward code must be one digit followed by two letters
An error. The last three characters are wrong — most often a letter and digit transposed, or "0" typed where "O" was meant (or the reverse).
The final two letters must not contain C, I, K, M, O or V
An error. These letters are never used in the unit, so their presence means a misread character. "O" for "0" in the sector digit is the usual cause.
The first letter must not be Q, V or X
An error. No postcode area begins with these letters, so the first character has been mistyped or the address is not a UK one.
Does not match any of the six permitted formats
An error raised when the length and the character classes are individually plausible but the arrangement is not one the system uses.
The district belongs to a post town that does not appear in the address
A warning, not an error. The postcode is valid; it simply belongs to a different town from the one written. That happens legitimately — post towns do not follow council boundaries, and a great many addresses carry a post town the resident would not use in conversation.
No building number or building name detected
A warning. UK addresses need one or the other, but plenty of valid addresses identify the property in a way a text scan cannot recognise.
District not in this registry
A note, not a fault. The postcode is structurally valid; the district is simply outside the curated registry, so the post town could not be cross-checked.

The layout the validator rewrites to

Royal Mail publishes the expected layout in its Address Management Guide, under the name "Clear Addressing". Lines run from the most specific to the least, the post town goes in capitals on its own line, and the postcode goes last.

The validator returns your address in this layout so you can compare it with what you have stored. A difference is not necessarily an error — it is a prompt to look.

Validating addresses in your own code

Two practical rules cover most of what goes wrong with UK address validation in production.

Normalise before you validate
Upper-case the input and strip every space, then re-insert one space three characters from the end. "sw1a1aa", "SW1A1AA" and "sw1a 1aa" are all the same postcode, and a validator that rejects two of the three will be blamed for lost sign-ups.
Validate the structure, then stop
Do not attempt to infer that an address is real from its postcode. Store what the customer typed, warn where it looks wrong, and block only on an error. If you genuinely need existence, call a PAF provider rather than tightening the regex.

The same checks this page performs are available over HTTP: GET /api/v1/postcodes/validate?postcode=SW1A+1AA for a postcode, and GET /api/v1/addresses/validate?address=... for a full address. No API key, and the response carries the component breakdown alongside the errors and warnings.

Frequently asked questions

Is this a Royal Mail address checker?

No, and no free tool is. It checks the format of an address and the structure of its postcode against Royal Mail's published conventions, which is public information. Checking an address against Royal Mail's own record of deliverable addresses requires a licence for the Postcode Address File (PAF), sold by Royal Mail and its resellers. This site is independent and is not affiliated with Royal Mail Group.

What is the difference between address validation and address verification?

Validation asks whether the address is written correctly — the right lines in the right order, a structurally valid postcode. Verification asks whether the address exists and can receive post, which can only be answered against licensed PAF data. This page does validation. The two terms are used interchangeably in marketing copy, which is the source of most of the confusion.

How do I validate a UK postcode?

Normalise it first: upper-case it, remove all spaces, then put one space back three characters from the end, because the inward code is always exactly three characters. Then test the result against the six permitted formats and, importantly, the letters excluded at each position — Q, V and X are never first; I, J and Z are never second; and C, I, K, M, O and V never appear in the final two letters. Paste a postcode above and the checker will show you which of those rules it breaks, if any.

Can you check whether a postal address is real?

Not here. A structurally valid postcode may be unallocated, and a real postcode may have no property at the number given. Confirming that a delivery point exists needs the Royal Mail Postcode Address File, which is licensed rather than open. If a form must only accept deliverable addresses, use a licensed provider — and expect to pay per lookup.

Why does my valid address show a warning?

Almost always because the postcode district belongs to a post town that is not written on the address. Post towns are a Royal Mail sorting construct and do not follow council or city boundaries, so an address can be entirely correct while carrying a post town the resident never uses. That is reported as a warning precisely so that a form does not reject it.

Does the validator accept GIR 0AA?

Yes. GIR 0AA was issued to the former National Girobank in Bootle and is a genuine postcode that matches none of the six standard formats. It is handled as a named special case. A validator that rejects it has a bug, and it is a useful test input for exactly that reason.

Does it work for Northern Ireland, the Channel Islands and the Isle of Man?

Northern Ireland is fully covered: the whole country sits in the BT postcode area and follows the same structural rules. The Channel Islands (GY, JE) and the Isle of Man (IM) use postcodes of the same shape and pass structural validation, but they are separate postal administrations outside the United Kingdom, so treat a country field accordingly rather than assuming "GB".

Is there an API for this?

Yes, and it is free with no key. GET /api/v1/postcodes/validate?postcode=SW1A+1AA validates a postcode and returns its area, district, sector and unit; GET /api/v1/addresses/validate?address=... validates a full address and returns the Royal Mail layout alongside the errors and warnings. Both are rate limited per IP address rather than per account.

Related pages

Related tools

Validation runs in the browser: nothing pasted into the form on this page is sent to a server, logged or stored.