Create random JSON, mock API responses and dummy test data from a template.
Write a JSON template using template tags to generate dynamic data.
The generated JSON data based on your template.
Ready to generate
JSON Generator is a free online tool for creating random JSON data. Instead of typing test data by hand, you write a JSON template that describes the shape you want and drop in template tags like firstName() or int(1, 100). Each time you click Generate, every tag is replaced with realistic fake data, so you get valid, ready-to-use JSON in seconds.
It works as a JSON maker and JSON creator in one: developers use it as a mock data generator for APIs, testers use it to make dummy JSON for fixtures, and writers use it to create sample JSON files for docs and tutorials.
This template produces an array of two user objects. Change repeat(2) to repeat(300) for a larger dataset (up to 300 items per array).
Template
[
"repeat(2)",
{
"id": "guid()",
"name": "firstName() lastName()",
"email": "email(example.com)",
"age": "int(18, 65)",
"status": "enum(active, disabled)"
}
]Example output
[
{
"id": "612b1152-2a11-46d9-8df4-146100e8a600",
"name": "Flossie Hahn",
"email": "Ross23@example.com",
"age": 27,
"status": "active"
},
{
"id": "0021e188-47e4-4454-b2ff-017f8e4f45db",
"name": "Valentin Homenick",
"email": "Russ69@example.com",
"age": 36,
"status": "disabled"
}
]You can also use JSON Generator as a plain JSON file creator. Anything in the template that is not a template tag is copied to the output as it is, so you can type or paste ordinary JSON, use Format to tidy it, and check it is valid as you go.
.json file, or as CSV or YAML.Mock JSON data (also called dummy, fake or sample JSON data) has the same keys, nesting and types as a real API response or database row, filled with realistic but made-up values. Shape the template like your real data, wrap it in repeat() for as many records as you need, and you have mock API responses or test fixtures in seconds, with no real personal data in them.
Read the guide to mock JSON data for when to use it, how to serve it as a mock API and how to keep it as fixtures.
For a worked example, see seeding test databases in CI/CD.
Every result is standard JSON (RFC 8259), so it works with any language, framework or tool.
A JSON generator creates JSON data for you instead of you typing it by hand. JSONGenerator.io works from a template: you describe the shape of the JSON and use template tags such as firstName(), email() or int(1, 100) where you want random values. Each time you click Generate, the tags are replaced with realistic fake data.
Write or paste a JSON template in the left editor, add template tags from the sidebar for the values you need, then click Generate. The random JSON appears in the output editor, where you can copy it or download it.
Put "repeat(n)" as the first item of an array, followed by the object you want repeated. For example ["repeat(10)", {"id": "guid()"}] produces ten objects, and repeat(5, 20) picks a random length between 5 and 20. An array can hold up to 300 items.
Type or paste your JSON into the template editor (plain values are copied to the output as they are, and template tags add random data where you want it), click Generate, then use the download button above the output to save it as a .json file. You can also download it as CSV or YAML.
Yes. That is the most common use. Shape the template like your API response or database table, use repeat() for as many records as you need, and generate mock API responses, dummy test data, fixtures or seed data for a test database.
There are over 50 template tags, covering names, usernames, emails, passwords, phone numbers, addresses, coordinates, countries, companies and job titles, products and prices, fake credit card numbers, GUIDs and ObjectIds, IP addresses, URLs, dates, numbers and custom enums. See the template tag reference in the Docs for the full list.
Yes. The output is standard JSON as defined by RFC 8259 and ECMA-404, so it can be parsed by any language or tool.
No. Generation runs entirely in your browser. Your template is saved in your browser's local storage so it is still there when you come back, but it is not sent to our servers.
Yes. It is free to use and does not require an account.
Yes. Paste your JSON (or a template) into the JSON Schema Generator and click Convert to get a matching JSON Schema.
Use the Contact page to send us a message. We read every suggestion.