Random JSON Generator

Lay out the fields you want, set a seed, then press Generate. The same seed returns the same records every time, so a fixture written today still matches next month.

Mock JSON schema builder

Start from

Schema

One row per key. Put a dot in the name to nest, so shipping.city lands inside a shipping object.

Output

The seed decides the data. Same seed, same records.

Leave the box empty and a seed gets picked for you, then written back so you keep it.

0%

Scatters nulls through every field apart from the auto increment ID, to test how your parser reacts to missing values.

Pick a starting schema, edit the rows, press Generate.

Random test data breaks tests. Seeded test data does not.

A snapshot test built on fresh random data fails on a schedule nobody chose. One run the price lands on 42.50, the next run it comes back 42.5 after JSON encoding drops the trailing zero, and the assertion falls over at 3am on a branch that changed nothing. The answer is not less randomness. The answer is randomness you reproduce on demand.

Type anything into the seed box. The generator hashes that string into a starting state for a small deterministic pseudo random function, then draws every value from it in order. Feed it invoice-tests and you get one dataset. Feed it invoice-tests-2 and you get a different one. Come back in six months, type the first string again, and the records match. Change one field in the schema and the values after it shift, because the draw order moved, which is worth knowing before you blame the seed.

Dot paths do the nesting

There is no tree editor on this page. A dot inside the field name is the entire nesting syntax. Three rows sharing a prefix collapse into one parent object.

Field name Typeshipping.street Street addressshipping.city Cityshipping.postcode Postcode
"shipping": {"street": "84 Mill Lane","city": "Rotterdam","postcode": "3011 KP"}

Nesting runs as deep as you write it. The key style select renames every segment at once, so a schema typed in camelCase exports as snake_case without editing a single row.

Records hold together

Most mock data pages pick each field on its own. That is how you end up with a record named Priya Sharma whose email reads bruno.keller@example.net, sitting at a Toronto address with a German postcode. This generator draws one identity and one place per record, then reads the related fields off them.

Pick the shape before you copy

Four output shapes cover most of what a stub needs:

What each field type produces

Identifiers
Auto increment ID, UUID v4 shape, Mongo ObjectId and SKU codes. The counter starts at 1, or at whatever number you type into the options column.
Numbers
Integers, decimals, prices and booleans. Set the bounds as 1-1000 or 9-899. Integer arrays take a length range instead of a value range.
People
Full name, first name, last name, email, username and phone, every one of them read off the single identity drawn for that record.
Places
Street, city, country and postcode, with the postcode formatted for the country the record landed in across twelve locales.
Business
Company, job title, product name, currency code, plus a list picker. Type your own values as active, pending, archived and one gets chosen per record. Numeric entries stay numbers, so a status code list gives you 404 rather than "404".
Text
Single words, sentences, paragraphs, tag arrays and slugs, all built from a pool of technical nouns so the filler reads as filler.
Time
ISO dates, full ISO timestamps, future dates and Unix milliseconds. The options column sets how many days back or forward the value sits, counted from midnight today, so an offset of zero days lands somewhere inside the current day rather than strictly before this minute.
Web
URLs, request paths, IPv4 addresses and hex colours, useful for log and analytics fixtures.

Where this generator stops being the right tool

Six limits worth reading before you build a test suite on the output:

One habit worth keeping

Record the seed in a comment next to the fixture it produced. A dataset whose seed nobody wrote down turns back into random data the moment someone regenerates it, and the reason a given record looked odd goes with it.

Where the output goes next

Send a generated array through the JSON formatter if you want a different indent width, or the JSON viewer to walk the tree before committing it. The JSON to Schema converter turns a sample into a contract you validate against, and JSON to TypeScript gives you the matching interfaces. For a spreadsheet handoff there is JSON to CSV, and JSON Path Tester checks a query against the data before it reaches your code. Everything else sits under all JSON tools.

Questions that come up on the second run

Seeds, nesting, nulls and what the output is safe for.

Does the same seed always give the same JSON?

Yes, as long as the schema stays the same. The seed string is hashed into a starting state and every value after that is drawn in order, so an identical schema plus an identical seed gives an identical run. Reorder the rows or change a type and the draw order shifts, which changes the values that follow. Date fields carry one caveat: they are measured back from midnight today, so a seed holds steady for the whole day and then slides forward by one day.

Is any of this sent to a server?

No. The schema, the seed and the generated records all stay in your browser. Nothing is uploaded, nothing is logged, and reloading the page throws the output away. Copy or download before you navigate off.

How do I nest a field?

Put a dot in the field name. A row named address.city creates an address object holding a city key, and any other row starting with address. joins the same object. Three levels deep works the same way, so profile.contact.email builds two parent objects for you.

What does the null chance slider do?

It replaces a value with null at the percentage you pick, field by field, on every type apart from the auto increment ID. Set it to 20 percent and roughly one value in five comes back null, which is a quick way to find the place your code assumes a string and gets nothing. The ID stays populated so records remain addressable.

Can I use these UUIDs as real primary keys?

No. They match the v4 layout, so any parser accepts them, and they are generated from a seeded pseudo random function rather than a cryptographic source. Two people using the same seed get the same identifiers. That is exactly what you want in a fixture and exactly what you do not want in a database.

Why is NDJSON on the list?

Because bulk loaders read it. BigQuery, Elasticsearch bulk indexing, most log ingestion pipelines and a lot of streaming consumers all expect one JSON document per line with no wrapping array, so the parser handles a file larger than memory one line at a time. Pretty printing is skipped in that mode since indentation would break every record.