UK fake data generator
Syntactically valid UK postcodes, IBANs, National Insurance numbers and test card numbers for filling in forms while you build. Everything here is generated by algorithm — no real address, bank account or card is involved, and nothing leaves your browser.
Nothing to check yet.
About this tool
Forms during development need something in the postcode field, the sort-code field, the card-number field — and typing your own real details into a staging environment repeatedly gets old fast. This generates values that are the right shape for each of these UK formats, computed by the same algorithms real validators use, without being tied to any real person, bank account or card.
How it works
The postcode generator picks from a set of real UK postcode area codes and assembles a syntactically valid outward and inward code — it does not check whether the specific result is a postcode that's actually in use. The IBAN generator builds a GB IBAN with correctly computed check digits, using the same ISO 7064 MOD97-10 checksum algorithm real banks use to validate one, over a made-up bank code, sort code and account number. The National Insurance number generator follows HMRC's published format rules for which letters and combinations are allowed. Test card numbers are generated to the correct length and prefix range for the chosen brand, with a valid Luhn check digit — the same checksum every real card number also satisfies.
Common questions
Will these test card numbers work at checkout?
No. Passing the Luhn checksum only means a number is shaped like a real card number — it says nothing about whether any actual issuer has allocated it, and no real payment processor will authorise it. Payment processors (Stripe, PayPal and others) publish their own specific sandbox test numbers that their test environments are built to recognise — use those for testing an actual checkout integration, not these.
Are these real postcodes, IBANs or NI numbers?
Not guaranteed either way. The generator only enforces the format rules — it doesn't check against Royal Mail's address database, a real bank's account records, or HMRC's allocation records, so a generated value might coincidentally match something real. Treat every result as placeholder data, not as verified-fake or verified-real.
Why did my "check" say invalid?
Each type is checked against its own rule: postcodes and NI numbers against a format pattern, IBANs and card numbers against their checksum (mod-97 and Luhn respectively). The checker message says which rule failed.
Known limitations
Format-valid, not verified-real (or verified-fake)No database of real addresses, accounts or card ranges is consulted — see "Are these real…" above.Not a payment processor's sandbox numbersLuhn-valid is necessary but not sufficient for any real checkout test flow — see "Will these test card numbers work" above.GB IBANs onlyOther countries' IBAN formats use different lengths and BBAN structures; this generator only covers the UK.
The same job at the command line
python3 -c "import random; print(random.randint(1000,9999))"Quick one-off random digits, if that's all a particular field needs.faker(Python) or@faker-js/faker(Node) — full fake-data libraries with far broader coverage than this page, worth reaching for once you need this in a seed script rather than pasted by hand.
More tools
See the whole toolbox — thirty-seven free tools planned, all running in your browser.