Mock JSON Generator

Generate simple mock JSON arrays from a field schema.

Open tool

Overview

The Mock JSON Generator turns a tiny field schema into a JSON array of fake records you can paste straight into a frontend stub, a fixture file or a REST mock server. Declare the fields once — name, type, optional constraints — set the row count, and the tool emits a JSON array with realistic-looking placeholder values for each row.

The generator is aimed at frontend developers building UI before the backend exists, QA engineers seeding API contract tests and designers wiring up high-fidelity prototypes. Long-tail searches like "generate mock json array online", "fake user data json fixture" and "stub api response generator" all resolve here.

How it works

You describe each column by giving it a name and picking a generator from a small palette: firstName, lastName, email, uuid, int, float, bool, date, enum and a free-form template that interpolates the other generators. The tool walks the schema row by row; for each cell it draws a value from a curated word list or a cryptographic random source as appropriate. UUIDs are RFC 4122 v4 (122 random bits with the four version bits set to 0100); dates are sampled uniformly from a configurable window; integers respect inclusive min/max bounds.

The output is pretty-printed JSON, but the tool can switch to compact mode for embedding in code. Because every value is generated locally there is no network round-trip and no risk of leaking real user data into a mock.

Examples

Schema: name, email, age  → [{"name":"Ada Lovelace","email":"ada@example.com","age":34}, ...]
20 rows of {id:uuid, score:float[0..1]} → JSON array ready for charting
Enum field: status in ["new","open","closed"] → uniform random pick per row
Compact output → single-line JSON for inline fixtures

FAQ

Are the values stable between generations?

No. Each click produces a fresh sample. Copy the result if you need a stable fixture, or commit the JSON to source control.

Can I produce nested objects?

The current schema is flat (one row of named fields). For nested fixtures, generate the parent and child arrays separately and merge them in code.

How realistic are the names and emails?

The values look plausible at a glance but come from a small curated pool, so duplicates appear in large runs. They are explicitly safe to use in screenshots and demos.

Is the UUID truly v4 compliant?

Yes. The four most-significant bits of the time-hi-and-version field are set to 0100 and the top two bits of the clock-seq-hi-and-reserved field to 10, matching RFC 4122.

What is the row cap?

A few thousand rows render instantly. For larger volumes, run the schema in a build script or copy the smaller output and replicate.

Try Mock JSON Generator

An unhandled error has occurred. Reload ×