
Mock Data Generator — Instant Fake JSON, CSV & SQL for Testing and Prototyping
📷 Photo by luis gomes / PexelsMock Data Generator — Instant Fake JSON, CSV & SQL for Testing and Prototyping
Stop writing dummy data by hand. Generate realistic fake datasets with names, emails, addresses, and more — instantly, for free, right in your browser.
Picture this: you've just scaffolded a shiny new React dashboard. The design is done. The components are wired up. You open the app and… stare into a void of empty tables, skeleton loaders, and placeholder text that says "John Doe" in literally every row because you copied the same object twelve times.
We've all been there. Writing dummy data by hand is one of those tasks that sounds like two minutes of work and somehow eats half your afternoon. You start with { id: 1, name: "Alice" }, then realize you need email addresses too. Then a phone number. Then a company. Then you want at least twenty rows so the pagination actually does something. Then your colleague asks why every user lives at "123 Main St." and you have to confess you typed that address personally.
There's a better way. The Mock Data Generator produces realistic, varied fake datasets in seconds, with no setup required.
Why Hand-Written Test Data Is a Trap
The problem with hand-crafted dummy data isn't just the time it takes — it's that it's too perfect. You type clean, uniform, predictable values because those are the easiest to type. Every name is Western-sounding, every email follows the same pattern, every string is roughly the same length.
Real data is messy. Names have hyphens and accents and unusual capitalization. Email addresses have numbers. Company names have punctuation. When you only ever test with pristine dummy data, you find bugs in production that your tidy test fixtures would never have exposed.
Good mock data should be:
- Varied — different lengths, different patterns, different cultural origins
- Plentiful — enough rows to stress-test pagination, filtering, and sorting
- Reproducible on demand — so you can regenerate it when the schema changes
- Format-flexible — JSON for JavaScript, CSV for spreadsheets, SQL for databases
That's exactly what this tool provides.
Use Cases: When Do You Actually Need Mock Data?
UI Prototyping
You're designing a user management table, a contact list, or a leaderboard. You need realistic-looking rows to see how the layout behaves at different data densities. Does the table overflow when a company name is 30 characters? Does the avatar column break the grid? You need real-ish data to find out, and you need it before you have any real users.
Database Seeding
Your local development database is empty. Running the app is a frustrating loop of hitting empty-state screens and edge cases that only exist when there are zero records. Seeding with 50–100 rows of mock data turns your dev environment into something that actually behaves like a real application. With the SQL output mode, you can paste INSERT statements directly into your database client or migration script.
API Mocking and Contract Testing
You're building a frontend before the backend API is ready. You need a mock server that returns plausible JSON — not just { "name": "test" } repeated indefinitely, but data that looks like it could come from a real system. Export the JSON output, drop it into a fixture file or a tool like MSW (Mock Service Worker), and your UI development can proceed independently.
Load and Performance Testing
You want to run a load test against a staging endpoint. You need a large, non-repeating dataset of users, orders, or events to send as request payloads. Generate 100 rows, adjust the row count, generate again — you can build up a substantial test corpus quickly without writing a single line of test setup code.
Demos and Presentations
You're recording a product demo or giving a presentation. Nothing breaks the illusion of a polished product faster than a table full of "John Doe / john@example.com" repeated ten times. A couple of seconds with the mock data generator gives you a screen that looks like a real, populated application.
How to Use the Mock Data Generator
Open the Mock Data Generator and you'll see three main controls.
1. Field Selection
Use the checkboxes to choose which fields to include. The available fields are:
- id — sequential integer starting at 1
- firstName / lastName — drawn from an international pool of names
- email — derived from the first/last name with a random two-digit suffix, always ending in
@example.com - phone — US-style format:
+1-XXX-XXX-XXXX - company — from a list of fictional company names
- jobTitle — a realistic job title (Software Engineer, Product Manager, etc.)
- address — street number + name + type (St, Ave, Blvd, Dr)
- city / country — paired from a set of 15 major world cities/countries
- zipCode — a random 5-digit code
- birthDate — a date between 1944 and 2006
- avatar — a Gravatar-style URL based on the email hash, renders as an identicon
- isActive — a boolean, weighted 70% true (realistic for user records)
- age — an integer between 18 and 80
You can mix and match freely. Want just id, firstName, lastName, and email? Check those four and you're done. Need a full profile? Check everything.
2. Row Count
Set the number of rows with the number input (1–100). The default is 10, which is usually enough to see layout behavior. Bump it to 50 or 100 for pagination and filtering tests.
3. Output Format
Toggle between three formats:
JSON — Returns an array of objects. Ideal for JavaScript/TypeScript projects, API fixtures, and anywhere you'd normally consume JSON.
CSV — Returns a header row followed by data rows. Open in Excel or Google Sheets, import into a database, or pipe through a script. The CSV to JSON tool is useful if you need to flip this later.
SQL — Returns INSERT INTO users (...) VALUES (...) statements. Copy and paste directly into a database client, or append to a migration file. Works with PostgreSQL, MySQL, SQLite, and any other SQL dialect that supports standard INSERT syntax.
4. Generate, Copy, Download
Hit Generate to create a fresh batch of random data (or whenever you want new values after changing settings). Use Copy to grab the output to your clipboard, or Download to save it as a .json, .csv, or .sql file.
Output Format Deep Dive
JSON
[
{
"id": 1,
"firstName": "Amara",
"lastName": "Rossi",
"email": "amara.rossi74@example.com",
"company": "NovaSoft"
}
]
JSON output is an array at the top level, so you can assign it directly to a variable, use it as a fixture file, or serve it from a mock API. If you want to validate or pretty-print it, run it through the JSON Formatter.
CSV
id,firstName,lastName,email,company
1,Amara,Rossi,amara.rossi74@example.com,NovaSoft
CSV is the lingua franca of data interchange. Import it into PostgreSQL with COPY, load it in pandas, open it in Google Sheets, or pipe it through a shell script. Fields containing commas or quotes are properly escaped. To convert CSV back to JSON for use in an API, use CSV to JSON. And if you have JSON you want to turn into CSV, JSON to CSV has you covered.
SQL
INSERT INTO users (id, firstName, lastName, email, company) VALUES (1, 'Amara', 'Rossi', 'amara.rossi74@example.com', 'NovaSoft');
The SQL output targets a table called users. Column names match the field names exactly. String values are single-quoted and escaped (apostrophes in values become ''). Boolean values are written as 1 and 0 for maximum compatibility. If your table has a different name, a quick find-and-replace in any text editor handles it.
Faker.js vs. a Browser Tool: When to Use Each
The most common library-based solution for mock data is Faker.js. It's excellent, and if you're generating data inside a codebase as part of tests or seed scripts, it's the right tool. Here's how to think about the tradeoff:
Use Faker.js (or similar libraries) when:
- You need mock data generation to be part of your automated test suite
- You need more than 100 rows at a time
- You want locale-specific data (French addresses, Japanese names in kanji)
- You need to integrate mock data generation into a CI pipeline
- You need data types Faker supports that this tool doesn't (credit card numbers, IP addresses, lorem ipsum, etc.)
Use this browser tool when:
- You need data right now without installing anything
- You're prototyping before a project even has a package.json
- You want to seed a remote or shared database from a machine where you can't run scripts
- You're in a design or product context where spinning up a Node script isn't practical
- You're sharing a tool with a non-developer colleague who needs test data
Both approaches have their place. The browser tool has zero friction — no install, no imports, no configuration. The library approach is more powerful and composable. For most day-to-day "I need 50 rows of user data right now" moments, this tool is faster.
Tips and Tricks
Combine city + country thoughtfully. The generator picks city and country independently, so you can end up with "Lagos, Germany" — which is technically fine for test data. If you need geographically consistent pairs, pick one or the other, or do a light post-processing pass.
The avatar field is a real URL. The generated Gravatar-style URL will render as an identicon image in any <img> tag. This is useful for testing avatar displays without setting up image uploads.
Use isActive for soft-delete testing. The isActive boolean is weighted 70% true, which gives you a realistic mix for testing filtered views (active users only, inactive users, all users).
Regenerate without changing settings. The Generate button creates a new batch every time you click it, even if you haven't changed anything. This is useful when you want a few different samples to find a representative one.
Download + import workflow. For database seeding, the fastest workflow is: select fields → set rows to 100 → choose SQL → click Download → open the .sql file in your database client → run. Done.
Wrapping Up
Mock data is one of those things you need constantly but can never justify spending real time on. The Mock Data Generator makes it a 10-second task instead of a 10-minute one. Pick your fields, pick your format, click Generate, and get back to the work that actually matters.
If you end up with a JSON blob you want to inspect or reformat, take it to the JSON Formatter. Need to transform that CSV into something a JavaScript app can consume? CSV to JSON handles it instantly. And if you're going the other direction — from JSON to CSV for a spreadsheet or data pipeline — JSON to CSV is one click away.
No install. No sign up. No data leaving your browser. Just data, on demand.