Random JSON Generator

Define fields, nest objects/arrays, weight custom lists, set ranges, add derived formulas, and link multiple tables — instantly, in your browser. 100% private.

NameTypeNull%
Download:

What is a Random JSON Generator?

A random JSON generator creates realistic mock data for development and testing. Instead of manually writing test fixtures, you define the structure — field names, types, ranges, even nested objects and arrays — and the tool generates thousands of realistic records instantly: names, emails, UUIDs, dates, coordinates, and much more.

Mock data is essential for frontend development (building UI before the API is ready), unit and integration testing (reproducible test fixtures), load testing (filling a database with realistic data), API prototyping (demoing endpoints without production data), and presentations (realistic-looking demos without exposing real user data).

Available Field Types

60+ types across nine categories, plus five structural types — enum (a weighted custom list), object (nested fields), array (repeated primitives or objects), formula (derived from sibling fields), and reference (joins to an earlier table).

CategoryExample typesSample output
IdentityfullName, username, uuid, mongoId, passwordArjun Patel · a1b2c3d4-e5f6-4…
Contactemail, phone, phoneIntl, url, avatarUrlarjun.patel42@example.com
AddressstreetAddress, city, state, zipCode, latitude4271 Main St, Surat, 394210
Numberint, float, price, percent, rating87.43 · 4.5 ★ · 12%
Date & Timedate, datetime, pastDate, futureDate, unixTimestamp2024-11-03 · 1735689600
Textword, sentence, paragraph, slug, hexColor, emojicache-matrix-42 · #3f9be2
Web / Techipv4, mac, userAgent, jwtToken, httpStatusCode192.168.4.17 · 404
Commercesku, isbn, creditCardNumber, companyName, jobTitleSKU-7F2A91 · Mehta Labs
Structuralenum, object, array, formula, reference{ tags: ["a","b"] }

Ranges, Weighted Lists, Nesting and Null Injection

Number fields (int, float, price, percent, rating, unixTimestamp) accept a min/max and a choice between a uniform or normal (bell-curve) distribution. A Custom List field takes one value per line and an optional weight (active:7) so, for example, 70% of generated records can land on "active". Object and Array fields let you nest a sub-schema one level deep — useful for an address object or an items: [...] array on an order. Every field also has an optional null-injection percentage, so you can test how your code handles missing data without hand-editing the output.

Formula Fields and Linked Tables

A Formula field derives its value from sibling fields already defined above it, using {fieldName} placeholders — {firstName} {lastName} joins two strings, while {price} * {qty} is evaluated as arithmetic (detected automatically from whether the template contains + - * /). The expression is parsed by a small built-in evaluator, not eval(), so nothing but arithmetic ever runs.

The tabs above the field list let you add more than one table to the same workspace — useful for relational-shaped test data. Give a field the Reference type and point it at a field on an earlier table (e.g. an orders table's user_id pointing at a users table's id) and it samples an actual generated value from that table, so the two arrays are genuinely joinable — not just two unrelated sets of random data. Tables generate in order, left to right, so a table can only reference ones before it.

Exporting and Reusing a Schema

The output isn't locked to JSON — the Download row converts the active table's records to CSV, SQL INSERT statements, NDJSON, or YAML, reusing JsonKit's existing converters (nested objects/arrays are flattened with dot notation for CSV/SQL). The Open in… row hands the current output straight to the JSON Formatter, Schema Generator, TypeScript, CSV, or YAML tools without a copy-paste round trip. If you already have a real JSON or CSV sample, Import… infers field names and best-guess types from it instead of building a schema by hand. And Share encodes the whole workspace — every table, its fields, record count and seed — into a URL, so a teammate opening the link gets the identical multi-table generator, with nothing saved on a server.

Seeding Random Data in Go Tests

go
// go get github.com/brianvoe/gofakeit/v6
import "github.com/brianvoe/gofakeit/v6"

type User struct {
    ID    string
    Name  string
    Email string
    Age   int
}

func randomUser() User {
    return User{
        ID:    gofakeit.UUID(),
        Name:  gofakeit.Name(),
        Email: gofakeit.Email(),
        Age:   gofakeit.Number(18, 80),
    }
}

// Generate a slice of random users
func randomUsers(n int) []User {
    users := make([]User, n)
    for i := range users {
        users[i] = randomUser()
    }
    return users
}

Mock Data in JavaScript Tests

javascript
// npm install @faker-js/faker
import { faker } from '@faker-js/faker';

function randomUser() {
  return {
    id:        faker.string.uuid(),
    name:      faker.person.fullName(),
    email:     faker.internet.email(),
    age:       faker.number.int({ min: 18, max: 80 }),
    active:    faker.datatype.boolean(),
    city:      faker.location.city(),
    createdAt: faker.date.past().toISOString(),
  };
}

// Generate 10 random users
const users = Array.from({ length: 10 }, randomUser);
console.log(JSON.stringify(users, null, 2));

Frequently Asked Questions

By default, yes — every generation uses fresh randomness, so consecutive runs produce different output. Set a Seed (any text) if you want reproducible results: the same fields, count, and seed always generate the same records, which is useful for stable test fixtures or a demo you need to re-run identically.

Yes — set a field's type to Object to nest a sub-schema, or Array to repeat a primitive or an object N times (with a min/max count you choose). Nesting is capped at one level deep to keep the schema editor manageable.

Up to 20,000 records per table. Generation above 2,000 rows runs in a background Web Worker so the browser tab stays responsive while it works.

Yes — give a field the Formula type and write a template like {firstName} {lastName} (joins text) or {price} * {qty} (arithmetic, detected automatically). It's evaluated by a small built-in parser, not eval(), so it can't run arbitrary code.

Yes — use the tabs above the field list to add more tables, then give a field the Reference type and pick an earlier table and field. It samples an actual value already generated for that table (e.g. a real user id), so two tables come out genuinely joinable rather than just two piles of unrelated random data.

Yes — the Download row converts the generated records to CSV, SQL INSERT statements, NDJSON, or YAML, using the same converters as JsonKit's dedicated conversion tools.

Yes — click Import…, paste a JSON object/array or a CSV sample (header + one row), and field names and best-guess types are inferred automatically. You can then edit any field before generating.

Yes — click Share to copy a URL with every table's fields, record count, and seed encoded directly in the link. Opening it loads the identical multi-table generator; nothing is stored on a server. Older share links from before multi-table support still work.

No — the generated data uses example.com domain names, placeholder structures, and fake-but-Luhn-valid card numbers. It is suitable for development, testing, UI prototyping, and demos only.

Related Tools