Billing Postal Code Generator
RG-75Pick a country and get random postal or ZIP codes in the correct layout, for testing checkout forms and validators. They are random and not checked against any real postal list.
Runs in your browser. Nothing is uploaded.
Not used. Press Generate for a new set.
Postal codes
How to use it
- Choose a country, or pick the mix to see codes from several countries with labels.
- Choose how many codes you need, from 1 to 100.
- Press Generate.
- Copy the codes into your test data, form or fixture.
Which layouts it covers
It covers the United States (5 digits and ZIP+4), Canada, the United Kingdom, Germany, France, Spain, Italy, Mexico, the Netherlands, Australia, New Zealand, Switzerland, Sweden, Japan, Brazil and India. Digit counts, hyphens and spaces follow each country layout. Canadian codes skip the letters D, F, I, O, Q and U. UK codes use real postcode area letters and the unit letters allowed in the last two places. Dutch codes use four digits and two letters.
What these codes are not
The numbers are random. They are not checked against any postal database, so a code may match a real place or none at all. A card issuer compares a billing code with the one on file for the card, so these will not pass a real address check. They are meant for test environments, form validation, sample data and screenshots.
Using them in tests
Use the single-country choice to fill a column in a fixture file, or the mixed choice to check that a form accepts several countries. Zero-only codes are skipped for plain digit formats. Because the output is just lines of text, you can paste it into a spreadsheet, a JSON file or a script. Nothing is stored, and each press gives a new set.
Questions people ask
Can I use these as a real billing postal code?
No. They are random and are not tied to any real address or card. A bank checks the code on a card against its own record, so a generated one will usually fail. Use them only for testing and sample data.
Which countries are supported?
There are 17 formats: US ZIP, US ZIP+4, Canada, UK, Germany, France, Spain, Italy, Mexico, Netherlands, Australia, New Zealand, Switzerland, Sweden, Japan, Brazil and India. A mixed option shows several of them with the country name.
Are the generated codes valid?
They match the country layout, but validity in the sense of an existing place is not checked. A random UK or US code may or may not exist. If you need a code that really exists, take one from an official postal lookup.
What are the Canadian postal code rules?
A Canadian code is letter, digit, letter, a space, then digit, letter, digit. The letters D, F, I, O, Q and U are never used, and the first letter is one of a fixed set tied to a province. This tool follows those letter rules.
Can I generate many codes at once?
Yes. The count menu goes up to 100 per press. Lines in one batch do not repeat. Copy the whole output and paste it into a file or a test script, then press Generate again if you need more.
About this tool
Builds codes that follow each country layout: digit counts, hyphens or spaces and, for Canada, the United Kingdom and the Netherlands, the letter rules. The numbers are random and are not checked against a postal database, so a code may belong to a real place or to none. Use them to test forms and validators, not as a real billing address: a payment card needs the postal code on file with its bank, and these will not match. Every pick uses crypto.getRandomValues in your browser, nothing is sent or stored, and each press gives a new set.