Guides
Reference material on UK addressing, postcodes, telephone numbering and safe test data.
- How to Check if a UK Address Is Real (and What “Valid” Actually Means) — Three levels of address checking, from a free format check to Royal Mail's delivery point data: what each proves, what each costs, which one your form needs, and how to spot a fake address.
- UK Bank Account Numbers: How Many Digits, How to Read One, and How to Check It — Eight digits, always with a six-digit sort code: where the numbers come from, how to read them on a card or cheque, what modulus checking and Confirmation of Payee actually prove, and safe values for test data.
- The National Insurance Number Format Explained, with a Validator — HMRC's exact rules for a NINO: the letters that never appear, the unallocated prefixes, the A to D suffix, temporary and administrative numbers, a validator in JavaScript and Python, and how to handle NINOs in test data.
- The NHS Number Format and Check Digit Explained — The ten-digit NHS number, its modulus 11 check digit with a worked example and code in three languages, the ranges for England, Scotland and Northern Ireland, and the 999 range reserved for test data.
- UK Company Registration Numbers: Format and Prefixes Explained — Eight characters, every Companies House prefix from SC and NI to OC, SO and R0, the leading-zero bug that corrupts company data, how it differs from a VAT number and a UTR, and how to use company numbers in test data.
- What Is a Post Town? How to Find Yours, and Why It Isn’t Always Your Town — The post town is fixed by your postcode and is often not the place you live. What it is, how to find it from an outward code, how it differs from the county, and why address forms get it wrong.
- The UK Driving Licence Number Format Explained — What each of the 16 characters on a GB driver number encodes (surname, date of birth, sex, initials), what a validator can and cannot check, how Northern Ireland differs, and how to handle licence numbers in test data.
- How Address Verification Software Works: PAF, UPRNs, Match Levels and What to Ask a Vendor — Validation, verification and autocomplete are different jobs. The data sets behind UK address verification, what each match result means, the questions to ask before buying, and how to test an integration without paying per request.
- Data Masking, Anonymisation and Pseudonymisation Under UK GDPR: What Each One Actually Means — One takes data outside the law, one leaves it fully inside, and the third can produce either. The legal definitions, why a masked database is usually still personal data, which technique fits which environment, and when to generate instead.
- Validating UK Phone Numbers: Formats, Ofcom Ranges and the Mistakes Every Regex Makes — Area codes are two to five digits, the prefix tells you the type, and most validators get both wrong. The rules, a classifier you can paste, seven common mistakes, E.164 storage, and the Ofcom drama ranges to use in test data.
- Mocking a UK Address Lookup API in Your Tests — Stop paying for postcode lookups in CI. Working MSW and Python examples for mocking an address lookup service, covering timeouts, rate limits and empty results, with safe fixtures.
- Testing KYC and Identity Verification Flows Without Real Identities — How to test UK onboarding and identity checks properly: provider sandboxes, mocking the provider, synthetic applicants, and the edge cases that find real bugs.
- Test Data Management: Production Copies, Masked Data and Synthetic Data — The three ways teams fill test environments, what each costs in realism, effort and UK GDPR risk, and a practical guide to choosing between them.
- UK Sort Codes, Account Numbers, IBANs and SWIFT Codes for Test Data — How UK bank identifiers are built, which ones carry check digits, working IBAN validation and generation code, and how to get bank details for tests that belong to nobody.
- The UK VAT Number Format Explained, with a Check-Digit Validator — What a UK VAT registration number looks like, how the two check-digit schemes work, a validator in JavaScript and Python, and how to use VAT numbers safely in test data.
- The UK Postcode Format Explained: Areas, Districts, Sectors and Units — A complete breakdown of how a UK postcode is built, the six permitted formats, the letters that can never appear, and the edge cases that break naive validation.
- Royal Mail Address Formatting: How to Lay Out a UK Address Correctly — The Royal Mail "Clear Addressing" conventions — line order, the post town in capitals, why the county is optional, and how to model UK addresses in a database.
- How UK Address Generators Work — and How to Tell a Good One — What separates a generator that produces usable UK test data from one that emits random noise: real districts, internal consistency, and honesty about what is fictional.
- Using Real Customer Data in Test Environments: The UK GDPR Problem — Copying production data into staging is processing personal data under UK GDPR. What the law actually requires, what the ICO has fined organisations for, and what to do instead.
- Why Your Address Form Rejects Perfectly Valid UK Addresses — Building names without numbers, BFPO, GIR 0AA, Northern Irish counties, Welsh street names and Scottish flat notation — the real addresses that break real forms.
- The UK Telephone Numbering Plan, and the Numbers Reserved for Fiction — How UK dialling codes are structured, why 020 7946 0xxx exists, and how to generate test phone numbers that cannot possibly ring a real person.
- Validating UK Postcodes in JavaScript, Python and SQL — Copy-paste implementations of correct UK postcode validation, normalisation and formatting, with the test cases that catch the usual mistakes.
- Where UK Address Data Comes From: PAF, ONSPD, OS Open Names and AddressBase — A practical guide to the authoritative UK address datasets, what each one contains, what it costs, and which one you actually need.
- Why Faker's UK Postcodes Fail Validation — Faker is the default test-data library in JavaScript, and roughly 70% of the UK postcodes it generates are not valid postcodes. Here is the measurement, the single bug behind most of it, and the code to reproduce the numbers yourself.