Generate random JSON data with customizable depth and structure
Nesting level (1-10)
Root properties (1-20)
Max array items (1-20)
Random JSON generator creates sample JSON data structures with realistic fake content. Generate users, products, addresses, or custom schemas with random but plausible values. Essential for API mocking, testing, UI development, and database seeding.
Select a data type template (user, product, address) or define a custom schema. The generator fills each field with appropriate random values: names from name lists, emails from patterns, numbers within ranges, dates within spans. Output is valid JSON ready for use.
Uses faker-style data generation: realistic names, email patterns, address formats, phone numbers. Arrays can have variable lengths. Nested objects supported. Custom schemas define field types and constraints. Output is deterministic with optional seeding for reproducible results.
Create fake API responses during frontend development.
GET /users returns array of random user objectsPopulate development/test databases with sample data.
Test list rendering with variable-length random data.
Generate large volumes of realistic request payloads.
// Simple random user generator
function randomUser() {
const firstNames = ['John', 'Jane', 'Alex', 'Sam', 'Chris'];
const lastNames = ['Smith', 'Johnson', 'Williams', 'Brown'];
const domains = ['gmail.com', 'yahoo.com', 'outlook.com'];
const firstName = firstNames[Math.floor(Math.random() * firstNames.length)];
const lastName = lastNames[Math.floor(Math.random() * lastNames.length)];
return {
id: crypto.randomUUID(),
firstName,
lastName,
email: `${firstName.toLowerCase()}.${lastName.toLowerCase()}@${domains[Math.floor(Math.random() * domains.length)]}`,
age: Math.floor(Math.random() * 50) + 18,
isActive: Math.random() > 0.3,
createdAt: new Date(Date.now() - Math.random() * 365 * 24 * 60 * 60 * 1000).toISOString()
};
}
// Generate array
const users = Array.from({ length: 10 }, randomUser);
console.log(JSON.stringify(users, null, 2));Combine random selections from realistic value pools. Use UUID for IDs, calculated emails, constrained ages.
Use random JSON generator for API mocking, test database seeding, UI development with sample data, and load testing. Not for production data.
Depends on the template. Names come from common name lists, emails follow standard patterns, addresses use real city/state combinations. Not suitable for production or user-facing content, but realistic enough for testing.