06 Generate

Mock data from JSON Schema

Generate realistic sample JSON that fits your schema: names, emails, dates, prices and more, from a seed you can repeat. Every item is validated before you see it.

Code editor. Press Escape, then Tab, to move focus out of the editor.

      How to generate mock data

      1. Paste a JSON Schema, open a file, or load one from your stash.
      2. Set how many items you want (1 to 100) and a seed. One item is shown as a single value, more as an array.
      3. Copy or download the JSON. Press Regenerate for a fresh set.

      The generator follows type, enum, const, format (email, uri, uuid, date-time, date, ipv4, ipv6, hostname and more), pattern, minLength/maxLength, minimum/maximum, multipleOf, minItems/maxItems, uniqueItems, required, allOf/anyOf/oneOf and local $refs. Property names guide the values: a firstName gets a first name, a price a price and a createdAt a timestamp.

      Options

      Seed
      Any text. The same seed, schema and options always produce the same data.
      Optional fields
      Include some optional properties at random, all of them, or only the required ones.
      Use examples & defaults
      When a schema lists examples, values are picked from them; default values are used some of the time.

      FAQ

      Will I get the same data again?

      Yes, for the same schema, seed and options. That makes the output usable as a test fixture. Press Regenerate to pick a new random seed.

      Is the generated data always valid?

      Every item is checked against the schema, and failing items are regenerated a few times. The status line shows how many items passed. Schemas that cannot be satisfied, or that need recursion without an end, are reported instead.

      Are the email addresses and names real?

      No. Names come from a small list of computing pioneers, and emails, URLs and hostnames use the reserved example.com domain, so they never reach a real person.