Advertisement
{ }

Random JSON Generator

Generate random JSON test data — users, products, transactions, time series — from realistic templates. Configurable size, deterministic via seed, browser-only.

Advertisement

Why You Need Random JSON Test Data

Realistic test fixtures are the difference between tests that pass on Tuesday and break in production on Friday. Hand-typed sample data drifts toward minimum-viable inputs ("name": "Test User"), missing the long-tail values that production sees: hyphens in names, emoji in addresses, century-old dates, eight-digit prices, empty strings, NULL middle names. A random generator with realistic ranges surfaces these issues during dev, not after deploy.

This tool ships four templates that cover the most common needs:

  • Users — id (UUID), name (first + last from a 500-name list), email ([email protected]), age (18–80), address (street + city + state + zip), createdAt (ISO 8601 within last year).
  • Products — id, name (random adjective + noun), sku, category, price (decimal, $1–$500), stock (integer 0–500), createdAt.
  • Orders — id, user_id, items (array of {product_id, quantity}), total (matches sum of items), status (pending/shipped/delivered/cancelled), timestamp.
  • Time-series — array of {timestamp, value} pairs over a configurable window with realistic noise around a sine-wave or linear trend.

Determinism via Seed

By default each click produces fresh randomness. Set a seed string to make the output reproducible: test123 always produces the same JSON, on this device or any other. This is essential for:

  • Snapshot tests that compare current output to a stored expected value.
  • Sharing fixtures with teammates without committing large JSON files.
  • Bug repros — paste the seed and same data appears.

The PRNG is xorshift32 seeded by a hash of the seed string. It's not cryptographically secure (don't use for tokens or passwords) but is plenty for fixture data.

Output Formats

  • Pretty — indented, human-readable. Best for inspecting in an editor.
  • Compact — single line. Smaller, ideal for HTTP request bodies and copy-pasting into curl -d.
  • NDJSON — one record per line. The line-oriented format that jq, BigQuery, and many log pipelines prefer.

For full JSON Schema-driven generation with custom rules, use libraries like json-schema-faker (Node) or hypothesis (Python). For schema validation of the output, see our JSON Validator. To convert generated JSON to other formats, see JSON to CSV.

How to Use

  1. Pick a template — Users, Products, Orders, Time-series.
  2. Set the record count — up to 10,000 in one click.
  3. Optionally set a seed — same seed produces identical output every time.
  4. Pick output format — pretty, compact, or NDJSON.
  5. Generate, then Copy or Download.

Frequently Asked Questions

What kinds of data does it generate?

Five built-in templates: Users (id, name, email, age, address), Products (id, name, price, sku, category, stock), Orders (id, user_id, items, total, status, timestamp), Time-series (timestamp + metric value over a window), and Custom (your own JSON Schema-like template, basic types only). All values are realistic — names from a 500-name list, addresses from real US cities, prices in a sensible range.

Why would I want a seed?

Setting a seed makes the output deterministic — running with the same seed twice produces identical JSON. Useful for reproducible tests (every CI run gets the same fixture data) and for sharing configurations (paste a seed to a colleague and they see the same generated data). Leave seed empty for fresh randomness on each click.

Is this PII-safe to use in production?

The names and emails are fake — they're combinations from generic word lists, not real people. Email addresses use the @example.com domain (RFC 2606 reserved). However, treat the output as test data only: don't use it as production seed data, don't paste it into systems that retain logs you can't redact, and don't assume any value is unique.

Does it support JSON Schema?

Partial. The Custom template accepts a simple shape definition like `{name: 'string', age: 'integer:18-80', items: 'array:string:1-5'}`. Full JSON Schema generation (with refs, enums, format validators) is out of scope here — use a library like json-schema-faker or fast-json-schema for that. This tool is for ad-hoc fixture generation.

How fast is it?

10,000 records per second is realistic in a modern browser for the built-in templates. Past 100k records the page can stall during rendering — use Download to skip rendering and get the full file.

Comments

No comments yet. Be the first!