DevTools Logo

Address Generator

Address Generator

Generate realistic addresses in the correct format for 21 countries — valid in shape, for software testing only

For Development & Testing Purposes Only - Synthetic Mock Data

Privacy Notice: This tool runs entirely in your browser. Nothing you generate or enter is sent to any server or stored anywhere.

Generator Settings

Pick a country and an output format, then generate a batch.

Generated values are valid in shape but randomized (Test Data).

Legal Disclaimer: Generated data is for software testing and validation purposes only (e.g. verifying input masks, form validation, or database seeding). It does not belong to real individuals. Using it to impersonate real people or for any fraudulent activity is illegal.

Examples

Validate a UK postcode with the spaced format

Input
country: GB
postcode: SW1A 1AA
Output
Valid format

The UK format allows 1–2 letters, a digit, an optional letter/digit, then a digit and two letters, with an optional space before the inward code.

Reject a too-short US postcode

Input
country: US
postcode: 1234
Output
Invalid — Does not match the expected postal format for this country

US ZIP codes are exactly 5 digits, optionally followed by -#### for ZIP+4.

Accept a Brazilian CEP

Input
country: BR
postcode: 01310-100
Output
Valid format

BR accepts only the dashed 5+3 form; the undashed 8-digit string would be rejected.

About this tool

Addresses look different everywhere — the postal code's position, whether the street number comes before or after the street name, and whether a district, province or prefecture appears all vary by country. This generator encodes the convention for 21 countries and emits a plausible address for each: a random house number, a real city, a common street name, and a correctly-formatted postal code.

Choose an output format — single line, multi-line (with the country name on its own line), JSON (structured fields), or HTML — and generate a batch of up to 50 at once for seeding a test database or filling out placeholder UI. A separate validator checks whether a postcode matches the selected country's expected format.

Everything runs locally in your browser; nothing is uploaded. The addresses are valid in shape but do not correspond to real homes — they are test data for software development.

How to use

  1. Pick country and format

    Choose the country whose address convention you want, and an output format (single line, multi-line, JSON, or HTML).

  2. Set the batch size

    Enter a count from 1 to 50 — useful for seeding a database or a test CSV.

  3. Generate and copy

    Click Generate to produce the batch, then copy the joined output.

  4. Validate a postcode (optional)

    On the Validator tab, pick a country and paste a postcode to confirm it matches the expected format.

Use cases

Seeding a test database

Generate a batch of plausible US or UK addresses in JSON to import as fixture rows during development.

Filling mock checkout forms

Populate single-line addresses when prototyping shipping or address-book flows without exposing real customer data.

Validating user-supplied postcodes at the point of entry

Paste a postcode the user typed and confirm it matches the selected country's expected shape before letting it through.

Sanity-checking localised address layouts

Compare multi-line output across countries to see where the postal code, region, and country name appear in the conventional order.

Output formats

FormatExample
Single line123 Main St, New York, NY 10001
Multi-line123 Main St / New York, NY 10001 / United States
JSON{ number, street, city, region, postalCode }
HTML<address> … </address>

21 countries supported. Postal codes match each country's format.

Common mistakes

Mistake:Assuming the validator confirms the postcode is real or currently in use.

Fix:The validator only checks the format (length, allowed characters, structure) — not whether the postcode has been assigned or whether a street exists.

Mistake:Treating generated addresses as real and forwarding them to customers or third parties.

Fix:The generator emits valid-shaped but fictional data. The page includes a Testing Only notice; only use the output for software development.

Mistake:Expecting the same JSON field set for every country.

Fix:Country-specific builders add fields such as district, province, prefecture, area, or building based on local convention, so the JSON shape varies by country.

Mistake:Assuming UK and Canadian postcodes use the same regex.

Fix:GB accepts 1–2 letters + digit + optional alphanum + digit + 2 letters (with optional space), while CA enforces an A1A 1A1 pattern — the validator uses country-specific rules.

Frequently asked questions

References & standards