Test data

Sample data generator by country

Generate realistic sample profiles with names, addresses, phones and emails formatted for 75 countries. Export as JSON, CSV or SQL.

Fields to include

API URL for the settings above

https://huynhthang.com/api/fake?locale=vi&count=5

Every value is fictional, generated randomly in your browser, and corresponds to no real person. The tool deliberately does not generate bank card numbers, national ID numbers or social security numbers.

This tool runs entirely in your browser — your data never leaves your device.

API

API reference

Everything this page does is available as an API too. No key, no sign-up, no trial period. CORS is open, so JavaScript in a browser can call it directly.

Endpoint

GET https://huynhthang.com/api/fake?locale=vi&count=5

Parameters

localeviCountry code. Must be one of the 75 listed below. Defaults to en_US.
count1 – 100How many records to return. Anything above 100 is clamped to 100. Defaults to 1.
seedabcAny string. The same seed with the same other parameters always returns the same records — use it when you need a fixed test fixture.
fieldsfullName,emailComma-separated list of fields. Omit it to get all 15.
minAge18Youngest age. Defaults to 18.
maxAge65Oldest age. If it is below minAge it is raised to match.

Call it with

curl "https://huynhthang.com/api/fake?locale=vi&count=5"

Run it right here

Press the button to make a real call and see the raw response.

Country list

GET https://huynhthang.com/api/fake/locales

Returns all 75 codes with their region code and English country name. The result never changes, so it may be cached for a day.

Error codes

400bad_localeThe country code is not on the list. The response includes the path to the full list.
400bad_fieldsOne or more field names do not exist. The response lists the bad names and every valid one.
429rate_limitedToo many calls too quickly. The response carries a Retry-After header with the number of seconds to wait.

Limited to 60 points per minute per IP address. Each call costs 1 point plus 1 for every 25 records — roughly 60 small calls, or 12 calls of the full 100 records. The gender field returns male or female, untranslated. Responses are never cached.

Free API, no key required, CORS open to every origin

What is Sample data generator by country?

Every developer eventually needs a hundred test users: to seed a test database, to fill a list view and see whether long names break the layout, to take documentation screenshots without exposing real customer records, or to run a load test. Typing them by hand is slow, and hand-typed data tends to be uniform, so it never surfaces the layout bugs you were looking for.

What makes this tool useful is that the data is genuinely local rather than English names machine-translated. Pick Vietnam and you get Nguyễn Văn with a ward, district and five-digit postcode. Pick Japan and you get kanji names with chōme-banchi addresses. Pick Germany and you get Straße with a five-digit PLZ. Seventy-five countries, each with its own name pools, address conventions and phone formats.

The seed box is the part developers will use most. Type anything into it and every run produces the same set of records. That keeps a test fixture stable across runs, and lets you reconstruct the exact data behind a failing test.

There is a practical reason too: using real customer data in a development environment still happens and is a genuine legal exposure under modern data protection rules. Generated sample data removes that problem entirely.

Beyond the interface there is a public API you can call straight from your own application. No key, no sign-up, and CORS is open so JavaScript in a browser can call it too. More importantly the API shares the exact same generation code as the page, so with the same seed it returns precisely what you see on screen. The URL matching your current settings is shown right below the results, ready to copy.

How to use

  • Pick a country from the list, using the search box above it.
  • Set how many records you want and the age range.
  • Enter a seed if you want the same result next time, or leave it empty for random.
  • Switch off any fields you do not need to keep the output tidy.
  • Copy or download as JSON, CSV or SQL INSERT statements.

Frequently asked questions

Is this real people data?

No. Names, addresses and phone numbers are assembled at random from per-country word pools, inside your browser. Any match with a real person is coincidental and unintended. Addresses follow the right format but are not real addresses.

Why are there no card or national ID numbers?

Because those are fields that are both checksum-verifiable and genuinely useful to a fraudster, while engineers working on payments are supposed to use the test numbers their payment provider issues rather than randomly generated ones. Leaving them out costs almost nothing and removes the worst misuse.

What is the seed for?

Reproducibility. The same seed with the same country and record count always produces the same data. That is useful for a fixed example set in documentation, or for recreating exactly the data behind a test failure.

How do I call the API?

A single GET is enough, for example /api/fake?locale=vi&count=10&seed=abc. The parameters are locale, count from 1 to 100, seed, fields, minAge and maxAge. The list of 75 country codes lives at /api/fake/locales. The limit is 60 points per minute per IP address; one call costs 1 point plus 1 for every 25 records. Going over returns a 429 with the number of seconds to wait.

How do I use the SQL export?

It produces a series of INSERT INTO people statements, one per record, with column names matching the fields you have enabled. Change the table name to match your schema and run it. Single quotes inside values are already doubled per the SQL standard.

Is any of this sent to a server?

No. The generator runs entirely in the browser; the server only sends you the page and the data pack for the country you picked. Disconnect from the internet once the page has loaded and the tool keeps working.