FormatterHQ

Random JSON Generator (Mock Data)

Create realistic fake JSON records for API mocks, UI prototypes and tests. Choose fields such as name, email, city and price, and generate up to 5,000 objects.

Output JSON
Ready.

How to use the Random JSON Generator

  1. Enter the number of records (rows) to generate, up to 5,000.
  2. List the fields you need, separated by commas, for example id,fullName,email,city,price.
  3. Generate the data to get a pretty-printed JSON array of objects.
  4. Copy or download the JSON and use it in your mock API, fixture file or prototype.

Fake JSON data that looks real

Front-end work often starts before the back end exists, and tests need data that nobody minds exposing. This random JSON generator creates an array of objects filled with realistic but fictional values: people's names, email addresses, phone numbers, street addresses, companies, products, prices, dates and more. The result is valid JSON, indented with two spaces and ready to save as a .json file.

Example

Fields id,fullName,email,city,age,active, two records:

[
  {
    "id": 1,
    "fullName": "Maria Kowalski",
    "email": "maria.kowalski41@gmail.com",
    "city": "Port Elianeborough",
    "age": 37,
    "active": true
  },
  {
    "id": 2,
    "fullName": "Darnell Hughes",
    "email": "darnell_hughes@yahoo.com",
    "city": "Lake Timothy",
    "age": 62,
    "active": false
  }
]

Numbers and booleans are emitted as real JSON numbers and booleans, not strings, so type-sensitive code behaves as it will with production data.

Fields in the random JSON generator

Type a comma-separated list of field names in the order you want the columns. Unknown names produce an error listing all valid ones. The full list is:

id, uuid, firstName, lastName, fullName, name, gender, email, username, password, phone, company, jobTitle, street, city, state, zip, country, countryCode, latitude, longitude, date, datetime, birthdate, age, boolean, active, number, price, product, ip, url, color, word, sentence, paragraph, avatar, iban, currency

id is a sequential number starting at 1, uuid is a random version 4 UUID, age is between 18 and 90, date and datetime fall within the past five years, and number is an integer from 0 to 10,000. Names, addresses, companies and products come from an English-language fake-data library.

What to use mock JSON for

  • Mock APIs – serve the file from a static server or a tool like json-server while the real endpoint is being built.
  • UI development – fill tables, cards and lists with enough variety to reveal layout problems such as long names or missing values.
  • Automated tests – load fixtures into unit and integration tests without copying real customer data.
  • Performance checks – generate thousands of records to see how search, sorting and pagination cope.
  • Demos and training – show a product with believable data that contains no personal information.

Working with the output

Once you have the data, other tools on this site can reshape it. Explore it as a collapsible tree in the JSON viewer, turn it into a spreadsheet with JSON to CSV, or generate typed models for your code with JSON to TypeScript. If you need nested objects, generate flat records here and restructure them in your code or editor.

Choosing fields for realistic tests

Mirror the shape of your real data as closely as possible. If your API returns firstName and lastName separately, generate them separately rather than fullName; if prices are decimals, include price so rounding and currency formatting get exercised. The closer the mock is to production, the fewer surprises when the real endpoint arrives.

Privacy and realism

The values are invented by a fake-data library, so they do not describe real people. However, generated email addresses use common provider domains and could, by coincidence, belong to someone. Never send email to fake addresses, and use a domain such as example.com (reserved for documentation) if your tests actually deliver messages. Everything is generated in your browser; nothing is uploaded.

Unlike the password and UUID tools, this generator is designed for realism, not secrecy: do not use the password field for real accounts.

Frequently asked questions

How many records can I generate?
Up to 5,000 records per run. For larger datasets, generate several batches and combine them, or use the output as a template for a script.
Can I create nested JSON objects?
The generator produces a flat array of objects, one level deep. You can nest the data afterwards in your code, or build a small template around the generated values.
Is the generated data real?
No. Names, addresses and companies are fictional values from a fake-data library. Email addresses use real provider domains, so avoid sending messages to them.
What fields can I use?
Supported fields include id, uuid, firstName, lastName, fullName, email, username, phone, company, jobTitle, street, city, state, zip, country, latitude, longitude, date, birthdate, age, boolean, price, product, ip, url, color, sentence and iban, among others.
Can I get the same data in CSV or XML?
Yes. Use the random CSV generator, random TSV generator or random XML generator, which accept the same field names.

Last updated September 26, 2026

Related tools