Mock Data Generator
Generate realistic mock data for testing, prototyping, and development
Examples
TypeScript interface for Users (deterministic schema)
Data Type: Users · Count: 1 · Format: TypeScript// Generated TypeScript interface and data
interface User {
id: number;
name: string;
email: string;
phone: string;
address: string;
company: string;
joinDate: string;
isActive: boolean;
}
export const users: User[] = [
{
"id": 1,
"name": "Sample Name",
"email": "sample@example.com",
...
}
];The interface is built from the types of the first sample row (id is a number, isActive is a boolean, everything else is a string), so it's identical every time you generate Users. The exported array's per-row values are random, so the schema is the stable part.
SQL with inferred column types
Data Type: Users · Count: 2 · Format: SQL-- Generated SQL for users
CREATE TABLE users (
id INTEGER,
name VARCHAR(255),
email VARCHAR(255),
phone VARCHAR(255),
address VARCHAR(255),
company VARCHAR(255),
joinDate DATE,
isActive BOOLEAN
);
INSERT INTO users (id, name, email, phone, address, company, joinDate, isActive) VALUES
(1, 'Alice', 'alice@example.com', '+1-555-555-5555', '123 Main St', 'Acme', '2024-01-15', TRUE),
(2, 'Bob', 'alice@example.com', '+1-555-555-5555', '123 Main St', 'Acme', '2024-01-15', TRUE);The CREATE TABLE infers INTEGER, DATE (because the header contains 'date') and BOOLEAN from the first sample, and VARCHAR(255) elsewhere. The INSERT block uses standard SQL single-quoted strings with the canonical TRUE/FALSE booleans.
JSON for an API fixture
Data Type: Products · Count: 1 · Format: JSON[
{
"id": 1,
"name": "Wireless Headphones",
"category": "Audio",
"price": 412.93,
"description": "High-quality wireless headphones with advanced features",
"inStock": true,
"rating": 4.3,
"imageUrl": "https://picsum.photos/400/300?random=0.42…"
}
]Product names and categories come from fixed lists, price is a random float between 10 and 1010 with two decimals, rating is between 3.0 and 5.0 with one decimal, and the image URL points at picsum.photos so the fixture renders without bundling real assets.
About this tool
Every prototype needs data, and reaching for production data is rarely an option — it's personal, regulated, or simply doesn't exist yet. This generator produces realistic but synthetic test data for users, products, and companies, plus a fully customisable schema mode where you pick the field names and types yourself.
Every row gets sensible defaults: a numeric id starting at 1, names drawn from common first/last combinations, a phone number in the standard +1-XXX-XXX-XXXX format, a US-style street address with a real city/state, and a date in ISO YYYY-MM-DD form. Pricing floats, ratings round to one decimal, booleans are weighted to be realistic (users are 80% active, products 90% in stock).
Choose your output: JSON for an API response, CSV for spreadsheet imports or SQL inserts, SQL for direct loading into a relational database, or TypeScript for typed fixtures in unit tests. The SQL output even generates a CREATE TABLE statement from the data shape, so you can paste it straight into a migration. Everything runs locally — generated data is never sent to a server.
How to use
Pick a data type
Choose Users (id, name, email, phone, address, company, joinDate, isActive), Products (id, name, category, price, description, inStock, rating, imageUrl), Companies (id, name, industry, website, employees, founded, headquarters, revenue) or Custom to define your own fields.
Set the count and output format
Enter the number of records (1–1000) and pick JSON, CSV, SQL or TypeScript as the output format.
Click Generate
The generator produces the data, formats it, and shows it in a syntax-highlighted panel with Copy and Download buttons.
Use it
Copy into your test fixtures, paste a SQL script into psql, save the CSV for spreadsheet imports, or import the TypeScript module directly from a unit test.
Use cases
Seeding a development database
Pick Users or Products, generate 50 records in SQL, and run the script against a local Postgres to populate a CRUD demo with realistic data.
Feeding UI mockups and Storybook
Generate 25 product records in JSON and pipe them into your component's props so list views, pagination and empty states all have content to render against.
Building typed test fixtures
Generate the data in TypeScript format and import the exported array directly into a Jest or Vitest test — the inferred interface doubles as the type contract.
Load-testing CSV imports
Spin up thousands of records in CSV format and feed them to your import pipeline to benchmark parsing, validation and insertion performance.
Output formats
| Format | What you get |
|---|---|
| JSON | Pretty-printed array of records, ready to drop into fetch mocks |
| CSV | Header row plus comma-separated records with quoted fields |
| SQL | CREATE TABLE inferred from the schema plus a multi-row INSERT |
| TypeScript | Typed interface plus an exported const array of records |
SQL CREATE TABLE infers INTEGER / DECIMAL(10,2) / BOOLEAN / DATE from the first sample, and falls back to VARCHAR(255) for strings.
Common mistakes
Mistake:Treating the generated data as production data.
Fix:The values are random — phones, addresses and emails aren't real, but they look real enough that you must scrub them before screenshots, demos or examples that could leak into customer-facing surfaces.
Mistake:Editing the SQL output by hand to fix column types.
Fix:The CREATE TABLE type inference looks at the first sample row. If you need a different schema, build a custom data type and set the field types explicitly instead of patching the generated DDL.
Mistake:Forgetting that the random number generator isn't seeded.
Fix:Two consecutive Generate clicks produce different rows. If you need stable fixtures for snapshot tests, copy the output into a fixture file rather than regenerating each run.
Mistake:Using custom field names with special characters.
Fix:Field names are emitted verbatim into JSON keys, CSV headers and SQL columns — anything other than letters, digits and underscore will break one of the three outputs.
Frequently asked questions
Related guides
References & standards
Related tools
CHANGELOG Generator
Write a clean, consistent CHANGELOG entry in the Keep a Changelog format from grouped Added, Changed, Deprecated, Removed, Fixed, and Security notes
Chmod Calculator
Calculate Linux file permissions (777, 755 etc) easily.
Credit Card Validator
Validate credit card numbers with the Luhn algorithm and detect the issuing network
Cron Expression Builder
Build and validate cron expressions with visual interface and presets
CSS/JS Minifier
Minify your CSS and JavaScript code to reduce file size.
Database Connection String Builder
Build and URL-encode connection strings for PostgreSQL, MySQL, MongoDB, Redis and SQLite from a simple form — with JDBC and key/value variants