Mock JSON Generator

One input per line. Output is numbered to match the input order.
Pinned tools are listed in your favourites on the home page.Copies a link to this tool that carries your current input, so it opens ready to run.Gives you an iframe snippet for putting this tool on your own site.
JSON Schema
Generated Output
Ctrl+Enter Run  · Ctrl+Shift+C Copy  · Esc Clear

Understand Mock JSON Generator

Generates sample JSON records that match a JSON Schema you paste in.

How it works

The schema is walked recursively: each type produces a value of that type, a format hint picks a realistic shape (uuid uses crypto.randomUUID, plus email, name, date, and uri), minimum and maximum bound numbers, minLength and maxLength bound strings, enum picks one of the listed values, and minItems and maxItems set array length. Objects recurse through properties, so nested structures come out with the same shape as the schema describes. Up to 50 records per run.

When to use it

  • Producing a realistic response body for a frontend before the API behind it exists.
  • Seeding a Storybook story or a test database from the schema you already maintain.
  • Generating a payload that sits at the maximum lengths a schema permits, to see how a UI copes.
  • Handing a designer sample data that matches the real contract rather than invented fields.
  • Checking that a consumer handles an empty array or an absent optional field.

Watch out for

  • This generates from a schema; it does not validate against one. It will happily produce data for a schema that is itself wrong — use the JSON Schema validator when correctness of the schema is the question.
  • Only part of JSON Schema is honored: type, format, enum, minimum, maximum, minLength, maxLength, minItems, maxItems, properties, and items. required, $ref, oneOf, allOf, pattern, and additionalProperties are ignored, so a schema that leans on them can produce data your real validator rejects.
  • Except for format: uuid, values come from Math.random. That is fine for fixtures, but the output is not reproducible between runs and must never be used where a value needs to be unpredictable to an attacker.
  • A plain string with no format is random base-36 noise, not words. Add format: name, format: email, or an enum when a screenshot or a demo needs readable values.

Not the right tool for: Bulk data at load-testing volume. The cap is 50 records per run; script a generator against your schema when you need tens of thousands of rows.

Frequently Asked Questions

How do I generate an array of objects?

Use schema type "array" with an "items" object: {"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}}}. Set minItems/maxItems to control array length.

What format hints are available?

Use "format" to get realistic values: "email" → user@example.com, "uuid" → UUID v4, "date" → ISO date, "url" → https URL, "name" → full name, "phone" → phone number. These go beyond random strings to produce plausible test data.

Can I use this for API testing fixtures?

Yes — define your API response schema once and generate dozens of test records. Export as a JSON array for seeding development databases, populating Postman collections, or feeding into automated test suites.

How to Use Mock JSON Generator

  1. Paste or type your input in the input area above.
  2. The tool processes your input automatically or click Run.
  3. Copy or download the result using the action buttons.
  4. Use Ctrl+Enter to run quickly from the keyboard.