Skip to content

Mock JSON Generator

Describe a shape and get as many rows of matching JSON as you need.

Field types

Anything not in this list is copied through as a literal, which is how you pin a constant.

Quick Tool Overview

The Mock JSON Generator takes a template describing the shape you want and returns as many rows of matching JSON as you ask for — nesting objects, repeating arrays and copying literals through unchanged.

What it does
Generates mock JSON from a shape you describe
You give it
A JSON template and a row count
You get back
Real JSON matching that shape
Best for
Building a fake API response before the API exists
Developer Tools Free, unlimited use No sign-up Runs in your browser

About the Mock JSON Generator

Write a template describing the shape you want, using a field type as each value, and get back as many rows of real JSON as you ask for. It is the fastest way to produce a believable API response before the API exists.

The template is itself JSON, so nesting works the way you would expect: an object inside an object produces nested data, and an array containing one template produces a list of that shape. Field types cover names, contact details, addresses, dates, numbers, booleans, identifiers and lorem text. Anything that is not a recognised type is treated as a literal, so fixed values and enums are just written in place.

Key features of the Mock JSON Generator

The template is JSON

So nesting works the way you would expect, with no separate schema language to learn.

Arrays of a shape

One template object inside an array produces a list of that shape, with a length in the range you set.

Literals pass through

Anything not recognised as a field type is copied unchanged, which is how you pin a version or an enum value.

Every field type

Names, emails, addresses, dates, numbers, prices, booleans, identifiers and lorem text.

Ready to serve

The output is valid JSON, so it drops straight into a fixture file or a mock server.

How to use the Mock JSON Generator

  1. 1

    Write your template

    A JSON object where each value names a field type, such as "fullName" or "price".

  2. 2

    Nest as needed

    Objects nest; an array with one item inside becomes a list of that shape.

  3. 3

    Set the count

    How many top-level rows to produce.

  4. 4

    Copy the JSON

    Formatted and ready for a fixture, a mock server or a prototype.

Frequently asked questions

Just nest them in the template. An object value produces an object with the same shape, to any depth.

Reviews of the Mock JSON Generator

What people who use the Mock JSON Generator think of it. Reviews come from visitors and are posted as written.

No ratings yet

Yours would be the first.

  • 5 0 reviews rated 5 stars
  • 4 0 reviews rated 4 stars
  • 3 0 reviews rated 3 stars
  • 2 0 reviews rated 2 stars
  • 1 0 reviews rated 1 star

Write a review

Used this tool? Your rating helps the next person decide.

Your rating

Plain text only — links, email addresses and HTML are not accepted. Your name and review are shown publicly; nothing else is collected. See the privacy policy.

0 reviews

Newest first

No reviews yet

Be the first to rate the Mock JSON Generator. It takes half a minute and no account.

Write the first review

More developer tools