Random JSON Generator

Define your fields and types, set the record count, and generate realistic mock JSON data instantly. No dependencies, 100% private.

Field Types

nameName
emailEmail
uuidUUID
intInteger
floatFloat
booleanBoolean
dateDate
urlURL
phonePhone
wordWord
sentenceSentence
countryCountry
cityCity

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 and types) and the tool generates hundreds of realistic records instantly — names, emails, UUIDs, dates, coordinates and 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

TypeExample outputUse case
nameArjun PatelFull name for user records
emailarjun.patel42@example.comUser email, login tests
uuida1b2c3d4-e5f6-4…Primary keys, correlation IDs
int4271Age, count, score, quantity
float87.43Price, rating, percentage
booleantrue / falseActive flag, feature toggle
date2024-11-03Birth date, created_at (date only)
urlhttps://example.com/widget/…Avatar URL, profile link
phone+1-512-834-7291Contact number
wordlambdaTag, category, keyword
sentencecache matrix open…Description, bio, note
countryIndiaCountry name
citySuratCity name

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

Yes — each click regenerates all values using Math.random(). The data is not seeded, so consecutive generations produce different output. For reproducible test data (seeded randomness), use a library like gofakeit (Go) with a fixed seed or faker-js with faker.seed(number).

Not directly from the UI — each field maps to a flat value. For nested structures, generate the flat data and then manually nest it, or use the JSON Flatten tool in reverse.

The tool supports up to 100 records. For larger datasets (thousands of records), use a server-side library like gofakeit (Go), Faker.js (Node.js), or Faker (Python) with a loop.

No — the generated data uses example.com domain names and placeholder structures. It is suitable for development, testing, UI prototyping, and demos only.

Related Tools