Skip to content
hateitall

Mock JSON Generator

Get a realistic JSON array for an API mock, a fixture file or a front-end prototype in seconds.

Processed locallyIn: Field listOut: JSON, JSON lines

Loading tool…

How to use mock json generator

  1. Start from the orders example or another preset.

  2. Edit the field names to match your API and pick a type for each.

  3. Choose how many records you need and a seed.

  4. Keep JSON for an array or switch to JSON lines for one record per line, then copy or download.

What this tool does

  • Field names are yours, so the output drops straight into a fixture or mock server.
  • Mark any field as sometimes null with a percentage, to test how your code handles gaps.
  • JSON lines output suits log tools, BigQuery and streaming imports.
  • Also exports CSV, SQL and TypeScript from the same fields.

How the result is verified

The JSON is parsed again and compared with the generated records value for value before it is offered.

Frequently asked questions

Can I make a field that is sometimes missing?

Set its Empty percentage. That share of records gets null for the field, chosen by the seed, so the same records are null each time.

How do I mock an enum such as status?

Pick the 'One of a list' type and type the allowed values separated by commas. Each record gets one of them.

Is my data uploaded to a server?

No. Everything you drop, paste or type is processed by code running in this browser tab. You can check it yourself: open your browser's developer tools, watch the Network panel, and use the tool. No request carries your data.

Seeded fake users, orders and products as JSON, CSV, SQL or TypeScript

Field list→ JSONLight on device

Fake CSV datasets from your own columns, with any delimiter

Field list→ CSVLight on device

TypeScript interfaces from a JSON sample, with optional keys

JSON→ TypeScriptLight on device

Beautify or minify JSON with your choice of indentation

JSON→ JSONLight on device

Infer a JSON Schema from sample data, draft 2020-12 or 07

JSON→ JSON SchemaLight on device