Home › Developer Tools › JSON Schema Mock Data Generator

JSON Schema Mock Data Generator

Paste a JSON Schema (draft-07, 2019-09 or 2020-12, or an OpenAPI component) and get realistic sample JSON that follows it: names, emails, dates, UUIDs and prices where the property names suggest them, values that match patterns and ranges, and as many documents as you need. A seed makes the output repeatable for tests and fixtures.

Last updated:

Data is generated in your browser from your schema. Nothing is uploaded, and the same seed always gives the same output.

Advertisement
Advertisement

How to use the JSON Schema Mock Data Generator

  1. Paste your JSON Schema into the left box, open a .json file, or pick one of the examples.
  2. Choose how many documents to generate and a seed. Shuffle picks a new seed.
  3. Decide on optional properties: always include them, include about half, or only required ones.
  4. Press Generate data (or leave Live update on) and check any notes under the panes.
  5. Copy or download the result as JSON or NDJSON for fixtures, mock APIs or seed data.

How schema keywords shape the generated data

KeywordEffect on the output
typeChooses string, number, integer, boolean, null, array or object. With a list such as ["string","null"], null appears about one time in five.
enum / constOne of the listed values, or exactly the constant.
formatWell-formed values: email, uri, uuid (version 4), date, date-time, ipv4 and others.
patternA random string matching the regular expression: classes, ranges, groups, alternation and quantifiers are supported.
minimum, maximum, multipleOfNumbers inside the range; multipleOf 0.01 gives prices with two decimals.
minItems, maxItems, uniqueItemsArray length within bounds, without duplicates when unique items are required.
requiredRequired properties are always present; optional ones follow the Optional properties setting.
allOfAll subschemas are merged before generating.
oneOf / anyOfOne branch is picked at random for each value, so several documents show the different shapes.
$refLocal references are followed; recursive structures stop after a few levels.
examples, defaultUsed as the value when "Use examples / default" is on.

Tips for better mock data

  • Name properties clearly. billingCity or unitPrice lead to more realistic values than field3.
  • Add examples for business-specific strings such as product names or plan codes; the generator rotates through them.
  • Use a fixed seed in tests so fixtures do not change between runs, and generate a larger batch with a new seed to look for edge cases.
  • Close the loop: generate a schema from a real response with the JSON Schema Generator, tighten it, create mock data here, then check samples with the JSON Schema Validator.

Frequently asked questions

What is a JSON Schema mock data generator?

It reads a JSON Schema, the document that describes what valid JSON looks like, and produces example JSON that satisfies it. Developers use it to create test fixtures, mock API responses, seed data and documentation examples without writing them by hand.

Which JSON Schema versions are supported?

The common keywords shared by draft-04, draft-06, draft-07, 2019-09 and 2020-12 work, including $defs and definitions, prefixItems and tuple-style items, and exclusiveMinimum as a number or boolean. OpenAPI 3.0 component schemas work too, including nullable and example.

Is the generated data guaranteed to be valid?

For the supported keywords the generator respects types, required properties, enums, ranges, lengths, item counts and patterns. Keywords such as not, if/then/else and external $ref files cannot be satisfied automatically, so they are listed in the notes. Check important fixtures with a JSON Schema validator.

What does the seed do?

The seed starts the random number generator. The same schema, options and seed always produce exactly the same documents, which keeps snapshot tests and shared examples stable. Change the seed or press Shuffle for new data.

How does it pick realistic values?

When a string has no format, pattern or enum, the property name is used as a hint: firstName gets a first name, email an address on example.com, zip a 5-digit code, createdAt a timestamp. Numbers named price, age, rating or quantity get sensible ranges unless the schema sets its own minimum and maximum.

Are the emails, phone numbers and URLs real?

No. Emails and URLs use the reserved example.com, example.org and example.net domains and phone numbers use the fictional 555 range, so the data is safe to use in tests and demos.

Can it follow $ref to other files?

Only references inside the same schema, such as #/$defs/address or #/definitions/Item. Remote or relative file references cannot be loaded in the browser; bundle the schema into one file first.

Are all the tools on FreeToolCabin tested for quality and accuracy?

Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.

Related tools

JSON Schema ValidatorValidate JSON against a JSON Schema (draft-07, 2019-09, 2020-12) with clickable error paths.JSON Schema GeneratorTurn sample JSON into a draft 2020-12 JSON Schema with types, required fields and formats.Fake Data GeneratorGenerate mock data as JSON, CSV or SQL.JSON FormatterBeautify, minify and validate JSON, with a collapsible tree view.QR Code GeneratorMake QR codes for links, Wi-Fi, email and more.Barcode GeneratorCreate Code 128, EAN-13, UPC-A, EAN-8, Code 39 and ITF-14 barcodes as PNG or SVG.UUID GeneratorGenerate UUID v4 and v7 / GUIDs in bulk and copy or download them.Schema Markup Generator (JSON-LD)Create JSON-LD structured data for FAQ, Product, Article and more.Htaccess & Nginx Redirect GeneratorBuild 301 redirects for .htaccess, Nginx and Netlify or Cloudflare _redirects.Random String GeneratorGenerate secure random strings and tokens in bulk with any length and character set.API Key GeneratorCreate secure API keys and secrets with prefixes, checksums and SHA-256 hashes for storage.MIME Type LookupFind the MIME type for any file extension, or the extensions for a MIME type, in 400+ entries.Cron Expression GeneratorBuild crontab schedules visually, read them in plain English and see the next run times.URL Slug GeneratorTurn titles into clean, SEO-friendly URL slugs: accents, stop words, separators and bulk lines.Gitignore GeneratorBuild a .gitignore from 50+ templates for languages, frameworks, IDEs and OS, merged and deduped.License GeneratorCreate a LICENSE file for MIT, Apache, GPL, BSD, ISC, MPL or Unlicense with your name and year.ULID GeneratorGenerate sortable ULIDs and UUID v7 in bulk, monotonic option, and decode their timestamps.Htpasswd GeneratorCreate .htpasswd entries with bcrypt, APR1-MD5 or SHA-1 for Apache and Nginx basic auth.Placeholder Image GeneratorCreate placeholder images in any size, color and text as PNG, JPG, WebP, SVG or data URI.Ads.txt GeneratorCreate or validate ads.txt and app-ads.txt files: seller lines, cert IDs and variables.Docker Run to Compose ConverterConvert docker run commands to docker-compose.yml, or a compose file back to docker run.Dockerfile GeneratorGenerate a production Dockerfile and .dockerignore for Node, Python, Go or a static nginx site.HTML Boilerplate GeneratorTick the options you need and get a clean HTML5 starter template with meta, OG tags and CSS reset.JSON to Zod SchemaInfer a Zod (or Yup) schema from sample JSON with optional, nullable and z.infer types.Linux Commands Cheat SheetSearchable Linux and bash command reference with flags explained, examples and copy buttons.LLMs.txt GeneratorBuild an llms.txt file for AI crawlers: summary and link sections, import from your sitemap.Nano ID GeneratorGenerate secure Nano IDs with custom alphabet, length and count, plus a collision calculator.Nginx Config GeneratorBuild an nginx server block: static site, SPA, reverse proxy or PHP, with SSL, gzip and redirects.OpenAPI / Swagger ViewerView OpenAPI 2/3 JSON or YAML as interactive API docs with validation and an endpoint list.package.json GeneratorFill a form and get a valid, npm-ready package.json with scripts, dependencies and checks.PKCE Code Challenge GeneratorGenerate an OAuth 2.0 PKCE code_verifier and S256 code_challenge, build auth URLs, verify pairs.README GeneratorFill in a form and get a polished README.md with badges, install, usage and license, live preview.Regex GeneratorBuild regular expressions visually from blocks or presets (email, date, phone) and test them live.Commit Message GeneratorBuild Conventional Commit messages with type, scope, body, breaking change and issue refs.Database Schema DesignerDesign tables and relationships visually, then export SQL for MySQL, PostgreSQL or SQLite.Docker Compose GeneratorBuild a docker-compose.yml with a form: services, ports, volumes, env, healthchecks and presets.Dummy File GeneratorCreate test files of an exact size in KB, MB or GB with zeros, random bytes or text.FFmpeg Command GeneratorPick a task and options, get the exact ffmpeg command with every flag explained.OpenAPI EditorEdit OpenAPI/Swagger YAML or JSON side by side with live API docs, validation and download.OpenAPI ValidatorValidate OpenAPI 3.0/3.1 and Swagger 2.0 specs: schema errors, broken $refs, line numbers.Pivot Table MakerBuild pivot tables from CSV or Excel by drag and drop: sum, count, average, charts, export.SQL Query BuilderBuild SELECT queries visually: joins, filters, GROUP BY, ORDER BY and LIMIT, as clean SQL.Truth Table GeneratorType a logic expression and get its full truth table, minterms and canonical DNF/CNF.TypeScript PlaygroundWrite TypeScript with live type checking, see the compiled JavaScript and run it in your browser.Article Schema GeneratorCreate Article, BlogPosting or NewsArticle JSON-LD with headline, authors, dates and images.Event Schema GeneratorCreate Event JSON-LD with dates, venue or online location, tickets, organizer and performers.Google Search Query BuilderBuild advanced Google searches with site:, filetype:, intitle:, exact phrases and date operators.HowTo Schema GeneratorCreate HowTo JSON-LD with steps, tools, supplies, total time and cost, then copy it.Htaccess GeneratorBuild an Apache .htaccess file: HTTPS, www, gzip, caching, error pages, IP blocks, hotlinks.HTML Email Template BuilderDrag and drop blocks to build a responsive, table-based HTML email with inline styles.Organization Schema GeneratorCreate Organization JSON-LD with logo, URL, contact points, address and social profiles.PIN GeneratorGenerate random 4, 6 or 8-digit PINs that avoid sequences, repeats, dates and common PINs.Product Schema GeneratorBuild Product JSON-LD with price, availability, brand, GTIN, ratings and reviews.Question Keyword GeneratorFind the questions people ask about a topic, grouped by who, what, why, how, can and more.Recipe Schema GeneratorCreate Recipe JSON-LD with ingredients, steps, prep and cook times, nutrition and ratings.Security Headers GeneratorPick HSTS, CSP, frame, referrer and permissions options and get Apache, Nginx, Netlify or Cloudflare config.SKU GeneratorBuild consistent SKUs from brand, category, size and color, then export every variant as CSV.Typography Scale GeneratorBuild a modular type scale from a base size and ratio, then copy CSS variables or a Tailwind config.WordPress Salt GeneratorGenerate fresh WordPress security keys and salts for wp-config.php, .env or Docker in one click.ANSI Color Code GeneratorStyle terminal text with 16, 256 or RGB colors and get escape codes for bash, Python, JS and C.Apache Virtual Host GeneratorCreate an Apache VirtualHost config with SSL, redirects, reverse proxy or PHP-FPM in seconds.Bash Prompt GeneratorDrag and drop a custom PS1 prompt for bash or zsh with colors, git branch and a live preview.Changelog GeneratorTurn Conventional Commit messages into a grouped Keep a Changelog Markdown file per version.cURL Command BuilderBuild curl commands from a form: method, headers, query, JSON or form body, auth and flags.Docker Compose to KubernetesConvert docker-compose.yml into Kubernetes Deployment, Service, ConfigMap and PVC manifests.Docker Compose ValidatorCheck a docker-compose.yml for YAML errors, schema mistakes, broken references and deprecated keys.Dockerfile LinterLint a Dockerfile for best practices: pinned tags, apt cleanup, non-root USER and layer count.Dockerignore GeneratorBuild a .dockerignore from Node, Python, Go and Java templates, plus your own entries.
See all 85 Code Generators & Builders →