Free Tool · No signup required

Mock JSON Generator — Realistic Fake Data from Your Own Schema

Define fields, pick types, set count — generate test JSON in one click

1
2
3

Handwriting JSON test fixtures is tedious and produces unrealistically uniform data that can mask bugs. This mock JSON generator lets you define a schema — field names, data types, and whether each field is an array — and generates realistic, varied fake records in one click. Supported types include string, number, boolean, ISO date, email address, UUID v4, realistic person names, and street addresses. Set the record count from 1 to 100, click Generate, and get an array of fully formed JSON objects ready to paste into your tests, seed scripts, API mocks, or Storybook fixtures.

How to Generate Mock JSON Data

Define your schema, set the count, and generate realistic test JSON in seconds.

1
Step 1

Define your schema fields

Click Add field to append a new row to the schema table. For each field, enter the field name (this becomes the JSON key) and select the data type from the dropdown. Available types: string (random words), number (random integer), boolean (true or false), date (ISO 8601 format), email (realistic email address), uuid (UUID v4 format), name (realistic first and last name), and address (realistic street address). Toggle the Array checkbox to make the field an array of 1-5 values instead of a single value.

2
Step 2

Set the number of records

Use the count input to set how many JSON objects to generate. The range is 1 to 100. For unit tests you might want 3-5 records. For seeding a development database or populating a Storybook story with a long list, generate 50-100 records. The output is always a JSON array.

3
Step 3

Generate, copy, or download

Click Generate JSON. The output panel shows a formatted JSON array of your records. Each record has realistic, varied values — emails have real-looking domains, names are plausible, UUIDs are properly formatted, and dates are in ISO 8601. Click Copy to copy the JSON to your clipboard, or use the output directly in your test file.

Features

8 data types: string, number, boolean, date, email, UUID, name, address

Array mode for any field — generates 1-5 values per field

Generate 1 to 100 records at once

Realistic data: plausible email addresses, proper UUID v4 format, ISO dates

Add and remove fields dynamically

Formatted JSON output — ready to copy or use directly

Runs entirely in your browser — no data sent to any server

Free with no account required

Related Tools

Frequently Asked Questions

What types of test data can I generate?

This tool generates eight types: string (random realistic words), number (random integer), boolean (true or false), date (ISO 8601 format such as 2024-03-15T14:30:00Z), email (realistic address like [email protected]), uuid (UUID v4 such as 550e8400-e29b-41d4-a716-446655440000), name (plausible full name), and address (realistic street address). Enable Array mode on any field to get an array of 1-5 values instead of a single value.

How is this different from using a hardcoded fixture?

Hardcoded fixtures use the same predictable values every time, which can cause tests to miss bugs that only surface with certain data patterns. Mock-generated data uses randomness within realistic constraints, so different test runs will exercise different code paths. For best results combine generated fixtures with property-based testing.

Can I export the generated JSON to a file?

The output panel has a Copy button to copy the JSON to your clipboard. You can paste it directly into a .json file, a seed script, or a test fixture file. Browser-based file download support is planned as a future enhancement.

What UUID format does this tool generate?

The tool generates UUID version 4 (UUID v4) formatted as 8-4-4-4-12 hexadecimal characters separated by hyphens, for example: 550e8400-e29b-41d4-a716-446655440000. UUID v4 is randomly generated and is the most widely used UUID version for generating unique identifiers without a central registry.

How do I use generated JSON in a Jest test?

Copy the generated JSON array and paste it into a .json file in your test fixtures folder, or paste it directly inline in your test file as a const. Import it and use it as the input to the function under test or as the mock response body for a fetch mock. Generated data with varied values helps catch off-by-one errors, null handling issues, and unexpected type coercions.