JSON Generator (Mock Data)
Make realistic sample JSON for a prototype, a test or a demo. Write one field per line as name: type, such as email: email or age: number(18,65), choose how many records you want, and get a JSON array to copy or download. A seed value makes the output repeatable. The values come from built-in word lists and fixed patterns, so every name, company and address is invented.
What you enter
- Fields (one per line, key: type)
- Number of records
- Output shape
- Spacing
- Seed (optional)
How it works
- List your fields, one per line, as key: type. The types you can use are listed in the help under the box.
- Set the number of records, from 1 to 1,000, and choose the shape of the output: an array, an object with a data key, or one record per line.
- Optionally type a seed. The same seed and the same fields always produce the same data, which is useful for tests. Leave it empty for new data each time.
- Press the button, then copy the JSON or download it as a file.
Why use mock data
A prototype with three hand-typed rows hides problems. Real data has long names, empty-looking values, big numbers and many rows, and each of those can break a layout, a table or a parser. Generating a few hundred records takes seconds and shows you the problems while they are cheap to fix.
Mock data also protects people. Copying a slice of a production database into a demo or a screenshot risks exposing real names, emails and phone numbers. Invented values avoid the question completely, which is especially useful when the work will be shown to a client or posted online.
Designing the shape of the data
Start from the response you expect from your API. List the same keys with the same types, keep ids as numbers or strings the way your backend will, and use ISO 8601 text for dates, which is the form JSON.parse leaves as a string for your code to convert. A mock that matches the contract can later be swapped for the real endpoint without changing the front end.
Keep one record flat unless you need nesting. This generator makes flat objects, which cover most lists, tables and cards. If you need an object inside an object, generate the flat parts here and nest them in your own code, or paste the result into a JSON formatter to check its structure.
Tips
- Use a seed in automated tests and screenshots so that the data does not change between runs. Change the seed when you want a new set.
- Match the real shape of your data. Use the same field names and types your app will receive, so you find layout and parsing bugs before real data arrives.
- Include awkward cases on purpose. Names of very different lengths, large numbers and dates near month ends show where a table or card breaks.
- Emails use the reserved example.com, example.org and example.net domains and phone numbers use the fictional 555-01xx range, so the data can never reach a real person.
- For a bigger or very specific data set, generate a small file here to define the shape, then scale it up with a script in your own project.
Frequently asked questions
What field types does the JSON generator support?
id (counts 1, 2, 3 and so on), uuid, name, firstName, lastName, email, username, phone, company, jobTitle, city, country, address, zip, date, datetime, number(min,max), price(min,max), boolean, choice(a|b|c), text, url, color and ip. Name, first name, last name, email and username in the same record belong to the same invented person.
How do I set a range for a number?
Write the type with a minimum and a maximum in brackets, for example age: number(18,65) for a whole number from 18 to 65, or cost: price(5,500) for an amount from 5.00 to 500.00 with two decimals. Without brackets, number gives a whole number from 0 to 1000.
How do I pick from my own list of values?
Use choice with the options separated by a bar, for example plan: choice(free|pro|team). Each record gets one of the options at random.
What does the seed do?
It starts the random number generator at a fixed point. Typing the same seed with the same fields and count always produces the same JSON. With the seed empty, the data is different on every press.
Is the JSON valid?
Yes. The records are built as real values and written with JSON.stringify, so strings are escaped correctly and numbers and booleans are not quoted. Choose the one-record-per-line option if you need newline-delimited JSON, where each line is a separate JSON object.
Related: JSON formatter, UUID generator, Lorem ipsum generator.
Start a 7-day free trial or see all free tools. On We.Inc you get a 7-day free trial, not a free plan: card needed, $0 today, cancel before it ends and you pay nothing. AI building is on paid plans from $20 a month.
More in Free Tools
- JSON Path Finder
- JSON Schema Generator
- JSON to CSV Converter
- JSON to HTML Table Converter
- JSON to TypeScript and Zod Converter
- JWT Generator and Decoder
- Keyword Density Checker
- Landing Page Copy Generator for Local Services
Product
Who It's For
- For Agencies
- For Freelancers
- For Hosting Providers
- For SaaS Platforms
- For Startups
- For Financial Services
- For Healthcare
Features
Resources
- Blog
- Help Center
- Free Business Tools
- Free UI Components
- Website Templates
- Template Collections
- Website Examples
- Guides
- Comparisons
- Alternatives
- Best Lists
- Reviews
- Pricing Guides
- Use Cases
- Glossary & Guides
- Integrations
- Developers
- Benchmark
- Windows App