Mock JSON Data Generator

Building a UI against three hand-typed records produces a UI that works for three hand-typed records. Realistic volume and realistic variation surface the layout, pagination, and performance problems that only appear with real data, and they surface them before a user does.

How to use it

  1. Pick a schema: users, products, or orders.
  2. Set how many rows you want.
  3. Copy the generated JSON. Everything is produced in the page.

Why fake data beats no data

Placeholder text of uniform length hides most of the bugs you are trying to find. Every name being roughly eight characters means you never see what happens to a table when one is sixty. Every price being a round number means you never find the currency formatting bug.

Realistic generated data varies in the dimensions that break interfaces: name length, presence or absence of optional fields, string values containing apostrophes and non-ASCII characters, prices with awkward decimal parts, and dates spread across a range rather than clustered on today.

It also lets you work at volume. A list view that feels instant with ten records and unusable with two thousand is a common outcome, and the only way to find out early is to render two thousand.

The alternative is worse

The usual substitute for generated data is a copy of production. This is a bad idea for reasons that go beyond principle.

Under GDPR and comparable regimes, using production personal data in a development environment is processing it for a purpose the subject did not consent to. Development environments also have weaker access controls, less monitoring, and a habit of ending up on laptops and in ad-hoc database dumps, which is how a substantial proportion of breaches actually happen.

Generated data has none of those problems, and it has a practical advantage as well: you can produce the edge cases you need on demand rather than hunting for a production record that happens to exhibit them.

What synthetic data will not tell you

It is worth being clear about the limits, because generated data creates its own blind spots.

Things it does not reproduce:

Making it reproducible

Output here is freshly random on each generation, which is what you want for exploring. It is not what you want for a test suite, where a failure that only reproduces sometimes is worse than no test.

For automated tests, generate a dataset once, commit it as a fixture, and use that. When you need generated data inside a test run, use a seeded generator so the same seed always produces the same records, which keeps failures reproducible while still giving you variety.

At a glance

SchemasUsers, products, orders
OutputJSON array of records
ReproducibilityFresh random values per generation
TransmittedNothing

Frequently asked questions

Can I get the same records again?

Not from this tool; each generation is fresh. For tests, generate once and commit the result as a fixture, or use a seeded generator in your test suite so failures reproduce.

Is it safe to use production data in development instead?

Generally no. It is a processing purpose the subject did not agree to, and development environments have weaker controls. Synthetic data avoids the problem and lets you produce edge cases on demand.

How many records should I test with?

More than you expect. Rendering and pagination problems appear somewhere between a few hundred and a few thousand rows, which is well past what anyone types by hand.

Will orders reference the users I generated?

No. Each record is generated independently, so there is no referential integrity between sets. Wire the relationships up yourself if your test needs them.

Related tools