Skip to main content
Back to Dev generators

Dev

Dummy JSON Array Generator

Building a frontend list view, seeding a component test, or mocking an API response all require a JSON array of objects with realistic, consistently shaped data. Hand-typing five user objects with UUID IDs, email addresses, and ISO timestamps is slow — a missed field causes a type error, and identical values hide bugs that only appear with varied data. The `schema` input selects the object shape. 'user' produces id (UUID), firstName, lastName, email, age, active, and createdAt. 'product' produces id, name, category, price, inStock, sku, and rating. 'order' produces orderId, customerId, status, total, items count, placedAt, and shippingCountry. 'blog-post' produces id, title, author, tags (string array), published, views, and publishedAt. 'device' produces id, hostname, type, os, ip, online, and lastSeen.

Read the complete guide — 4 min read

How to use

  1. Choose your options above
  2. Click Generate
  3. Copy your result

Detailed instructions

  1. Select a schema type from the dropdown that matches the data structure you need (user, product, order, blog post, or device).
  2. Set the count field to the number of records your test or mock requires — start with 10 for component tests or 50 for database seeding.
  3. Click Generate to produce the JSON array with randomised, realistic field values across every record.
  4. Review the output to confirm the field names align with your expected data model, then copy the entire array.
  5. Paste the copied JSON into your Postman mock, fixture file, db.json, or seed script and use it immediately.

Use Cases

  • Seeding a list or table view with sample records
  • Building a frontend before the real API exists
  • Creating fixtures for tests that expect a JSON array
  • Stubbing a mock server response with realistic data
  • Stress-testing rendering with a large array of objects

Tips

  • When testing paginated endpoints, generate at least 25 records so you can verify page boundaries and edge cases at different page sizes.
  • If your schema needs a nested structure, generate two arrays with different schemas and manually combine them — for example, embed product objects inside order records.
  • For Cypress tests, save the output as a named fixture file like users.json and load it with cy.fixture('users') to keep tests decoupled from hardcoded data.
  • Generate a small batch of 3–5 records when writing snapshot tests — large arrays make snapshots hard to diff and slow to review on pull requests.
  • Cross-reference generated product prices and order totals if your UI does calculations — since values are random, mismatches won't reflect real business logic without manual adjustment.
  • Use the device schema to mock IoT or analytics dashboards where you need sensor IDs, status flags, and timestamps without building a real data pipeline.

FAQ

which schema types does the generator support and what fields do they include

Five schemas: user (id, firstName, lastName, email, age, active, createdAt), product (id, name, category, price, inStock, sku, rating), order (orderId, customerId, status, total, items, placedAt, shippingCountry), blog-post (id, title, author, tags, published, views, publishedAt), and device (id, hostname, type, os, ip, online, lastSeen). Each field uses a type appropriate to its domain — prices are floats, tags are string arrays, IDs are UUIDs.

is the generated json valid and can I paste it directly into code

Yes — the output is well-formed JSON you can paste into a fixture file, a Postman mock response body, a json-server db.json, or code without cleanup. Each object follows a consistent shape with correct field types, so it parses cleanly and the TypeScript compiler won't flag missing fields if you type your fixtures against the generated structure.

how many records should I generate for different use cases

3–5 records for snapshot tests (large arrays make snapshots hard to review), 10–20 for component rendering tests, 25–50 for pagination and scroll testing. The device schema is useful for IoT or analytics dashboards where you need a realistic fleet of varied statuses and last-seen timestamps without building a real data pipeline.

can I get a nested json structure from this generator

No — each schema produces flat objects. For nested structures, generate two arrays with different schemas and manually combine them: for example, embed product objects inside order records by replacing the productId field with a full product object from the product array. The generator does not support custom schemas or field configuration beyond the five preset options.

You might also like

Popular tools from other categories that share themes with this one.

Try these next

More free tools from other corners of the catalog, picked by shared themes.