Skip to main content
Beta We're in open beta - lock in lifetime access to today's feature set for just £99.99.

UK Postcode Format Support

We clean UK postcodes from many different input formats. See what we support below.

Supported Format Variations

Spacing Variations

SW1A 1AA
SW1A1AA
SW 1A 1AA
SW1A 1AA
M1 1AA
M11AA

Separator Types Handled

SW1A-1AA
SW1A.1AA
SW1A/1AA
SW1A_1AA
SW1A:1AA
SW1A;1AA
SW1A,1AA
SW1A|1AA

Labels & Prefixes Removed

Postcode: SW1A 1AA
PC: SW1A1AA
Address: SW1A 1AA
SW1A 1AA (postcode)
UK SW1A 1AA
London SW1A 1AA
SW1A 1AA, UK
SW1A 1AA, London

Wrapping Characters

"SW1A 1AA"
'SW1A1AA'
*SW1A 1AA
#SW1A1AA
SW1A 1AA
'SW1A 1AA

Lowercase & Case Variations

sw1a 1aa
sw1a1aa
Sw1a 1aa
SW1a 1AA
sw1A 1aa
Sw1A 1Aa
sW1a 1Aa
m1 1aa

All postcodes are normalized to uppercase during validation.

All UK Postcode Formats

M1 1AA
A# #AA
M60 1AA
A## #AA
CR2 6XH
AA# #AA
DN55 1PT
AA## #AA
W1A 1AA
A#A #AA
EC1A 1BB
AA#A #AA

Special Cases Handled

No Space Variation:
SW1A1AASW1A 1AA
Missing Space:
M11AAM1 1AA
With Address:
10 Downing Street, SW1A 1AASW1A 1AA
With City:
London SW1A 1AASW1A 1AA

Output Format

All postcodes are formatted consistently with proper spacing:

SW1A 1AA M1 1AA EC1A 1BB

Outward code (area), space, inward code (3 characters).

Have a Format We Don't Support?

If you have postcode data in a format we don't currently handle, please contact us with examples and we'll add support!

Back to Validation Rules