Mock JSON Generator
JSONGenerate fake JSON data with @faker-js/faker — pick preset fields or author a template, choose a locale, and export as JSON or CSV.
Remote URLs are not fetched; paste your JSON directly.
On this page
What is a mock JSON generator?#
Realistic test data is the boring bottleneck of every prototype. You want to see how a table renders with five hundred rows, how a form behaves with weird email addresses, how a chart looks when the numbers span three orders of magnitude — and instead you spend the afternoon typing {"name":"test","email":"[email protected]"} over and over, because real data is private and you cannot use it.
A mock JSON generator fills that gap. You describe the shape of the object you need — a few field types, or a template with placeholders — and it synthesizes as many rows as you ask for, each one different, none of them real people. The output is a JSON array you can drop straight into a fixture file, a demo database, or a fetch mock.
This page generates in two ways. Preset mode gives you a menu of common fields (full name, email, phone, UUID, date, company, and more) that you tick on and off; each row becomes an object with those fields. Template mode lets you write a JSON skeleton with {{faker.path}} placeholders, so you control the exact key names and nesting. Output can be downloaded as JSON or CSV for the spreadsheet path, and locale-aware data is supported so the names look right for the audience you are demoing to.
How to use it#
- Pick a mode from the toolbar toggle:
- Preset (the default): a checklist of field types appears on the left. Tick the ones you want in each row — for example Full name, Email, and UUID. Each field has a fixed default key (
name,email,uuid). - Template: a textarea appears instead. Write a JSON object (or array) whose string leaves hold placeholders like
{{person.fullName}}or{{internet.email}}.
- Preset (the default): a checklist of field types appears on the left. Tick the ones you want in each row — for example Full name, Email, and UUID. Each field has a fixed default key (
- Set the Count — how many rows to generate, from 0 up to 1000.
- Pick a locale to flavour the generated names, cities, and phone numbers. Ten locales are offered, from English to 中文, 日本語, 한국어, العربية.
- Click Generate. The right pane fills with a pretty-printed JSON array of the synthesized rows.
- Click Download JSON or Download CSV under the output to save the result as a file (CSV is handy for loading into a spreadsheet or seeding a database via import).
- Use Sample to load a starter template, or Clear to reset.
The heavy generator library loads only when you first click Generate, so the page opens instantly. Generation runs entirely in your browser.
Key features#
- Two authoring styles. Tick fields for a fast start, or write a template when you need custom keys, nesting, or a mix of literal text and generated values.
- Fourteen preset fields. Names, job titles, emails, usernames, phones, UUIDs, recent dates, cities, countries, companies, URLs, paragraphs, and colour names — the common building blocks of a demo record.
- Locale-aware values. Switch locale and the person and location data follow — useful when the demo needs to look local.
- Template placeholders keep types. A placeholder that is the entire value of a string leaf resolves to its native type — so
{{date.recent}}becomes a real ISO date string, not a quoted fragment. - Up to 1000 rows. Enough to populate a paginated table or a representative fixture without overwhelming the tab.
- JSON and CSV export. Generate once, export for whichever consumer you have — a JSON fixture or a spreadsheet import.
- Local only. Data is synthesized in your browser; nothing about your template or output leaves the page.
Worked example#
You need ten user records for a demo, each with a name, an email, and a unique id. Leave it in Preset mode, untick everything except Full name, Email, and UUID, set Count to 10, and click Generate. The output is a JSON array whose first rows look like:
[
{
"name": "Sara Schultz",
"email": "[email protected]",
"uuid": "f3a1c2b4-9d8e-4a7b-bc6e-1f2d3a4b5c6d"
},
{
"name": "Derrick Watsica",
"email": "[email protected]",
"uuid": "b7e6d5c4-a3b2-4987-8d6e-5c4b3a2f1e09"
}
]
Every row is different, none of the addresses is a real inbox, and the UUIDs are unique. For a custom shape the preset cannot express — say a record that mixes a literal role with generated fields — switch to Template mode and write:
{
"id": "{{string.uuid}}",
"name": "{{person.fullName}}",
"role": "member",
"email": "{{internet.email}}"
}
The role field is literal text, so every row reads "member"; the other three resolve to fresh synthesized values on each row. Set the count to however many you need and export.
FAQ#
Are the email addresses real inboxes I can send to?#
No. Every value is synthesized — the names are plausible combinations, and the email addresses follow a realistic shape but do not route to anyone. That is the point: you get data that looks like production data for testing layout, validation, and sorting, without touching a real person’s mailbox.
Can I make the data look local to a specific country?#
Yes. The locale selector changes how person names, cities, and phone numbers are generated. Pick 中文(简体) and the names become Chinese names; pick 日本語 and they become Japanese names. This matters when a demo has to feel authentic to its audience.
In template mode, why does {{date.recent}} show up as an ISO string without quotes around the date logic?#
When a placeholder is the entire value of a string leaf, it resolves to the generator’s native return value rather than being interpolated as text. A recent-date call returns a real date object, which then serializes as an ISO string in the output JSON. If you want it embedded inside surrounding text instead, put literal characters around it — "shipped on {{date.recent}}" — and it will be stringified into the sentence.
How many rows can it generate at once?#
Up to one thousand. That is enough to fill a paginated table, populate a fixture file, or seed a test database via CSV import. Beyond that, generate in batches or reach for a dedicated database seeder.
Is the generated data reproducible?#
Each click of Generate produces a fresh random set — that is what you want when you are hunting for edge cases in a UI. The values are not pinned to a seed in this page, so do not treat a specific output as something you can recreate byte-for-byte later; save the output to a fixture file if you need to reproduce a particular dataset exactly.