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.
Developers use it as a mock data generator for APIs, testers use it to make dummy JSON for fixtures, and writers use it to produce 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"
}
]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.
Yes. After generating, use the download button above the output to save the data 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 and generate as many records as you need for front-end prototypes, unit tests, fixtures or seeding 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.