Mock Data Generator
DeveloperGenerate realistic mock data for testing and development. Build a custom schema, set row count, and export as JSON, CSV, or SQL.
Discussion
Join the discussion
Sign in to share your thoughts and engage with the community.
About this tool
What is the Mock Data Generator?
The Mock Data Generator is a developer tool for generating realistic fake data on demand. Instead of manually writing test fixtures or populating databases with placeholder values, you define a schema — a list of named fields each with a data type — set a row count, and generate a full dataset instantly. Results can be exported as JSON, CSV, or SQL INSERT statements and dropped straight into your project.
It's useful at every stage of development: seeding a local database, testing an API with realistic payloads, populating a UI prototype with believable content, or writing automated test cases that need varied input data.
How to Use the Generator
- Define your schema. The default schema includes id, firstName, lastName, email, and country — a common starting point. Add, remove, or reorder fields to match your data model. Each field has a name you control and a type you select from the dropdown.
- Choose field types. The type dropdown is grouped into seven categories: Personal, Location, Internet, Company, Finance, Content, and Misc. Pick the type that matches what each field represents.
- Set the row count. Enter how many rows you need — from 1 up to 500. For most testing purposes 10–50 rows is sufficient, but larger datasets are supported for load testing or bulk imports.
- Set the table or file name. This is used as the SQL table name in INSERT statements and as the filename when exporting.
- Click Generate. Data is generated instantly in your browser and displayed in a scrollable table. Hover over any truncated cell to see the full value.
- Export. Choose JSON, CSV, or SQL from the format selector and click Export to download the file.
Field Types
Personal — first name, last name, full name, email address, phone number, gender, age, date of birth, avatar URL.
Location — street address, city, state, country, zip or postal code, latitude, longitude, timezone.
Internet — username, password, URL, domain name, IP address, UUID, MAC address, user agent string.
Company — company name, job title, department, industry, catch phrase.
Finance — credit card number, card issuer type, card expiry date, CVV, IBAN, currency, price, Bitcoin address.
Content — word, sentence, paragraph, URL slug, emoji, hex color code.
Misc — boolean, integer, file name, MIME type, semantic version string.
Export Formats
JSON — a pretty-printed array of objects. Each object represents one row, with field names as keys. Ready to paste into API tests, Postman collections, or fixture files.
CSV — comma-separated values with a header row. Compatible with spreadsheet tools, database import wizards, and data processing scripts. Values containing commas or quotes are properly escaped.
SQL — a single INSERT INTO statement with all rows as a multi-value insert. The table name matches the name you set in the controls. Useful for seeding a development or staging database directly.
Common Use Cases
API development — generate realistic request payloads to test endpoints without needing a populated database first.
Frontend prototyping — populate tables, cards, lists, and forms with believable data so designs look realistic in review.
Database seeding — generate SQL inserts for a development or staging environment without writing seed scripts by hand.
Automated testing — create varied input datasets for unit or integration tests that need to exercise different data shapes.
Load testing — generate hundreds of rows to simulate realistic data volumes when benchmarking queries or endpoints.
Privacy
All data is generated entirely in your browser using the Faker.js library. No schemas, field names, or generated data are sent to any server or stored anywhere. Every generation run produces new randomized values.
How to Use
- 1
Define your schema
Add fields using the Add Field button. Each field has a name you control and a type selected from the grouped dropdown — choose from 35+ types across Personal, Location, Internet, Company, Finance, Content, and Misc.
- 2
Set the row count
Enter how many rows of data you need — from 1 up to 500. The default is 10 rows.
- 3
Set the table or file name
Enter a name used as the SQL table name and as the filename when exporting.
- 4
Click Generate
Data is generated instantly in your browser and displayed in a scrollable table with all your fields as columns.
- 5
Export your data
Select JSON, CSV, or SQL from the format selector and click Export to download the file.
Frequently Asked Questions
What field types are supported?↓
The generator supports 35+ field types grouped into seven categories: Personal (name, email, phone, gender, age), Location (address, city, country, coordinates), Internet (username, UUID, IP, URL), Company (company name, job title), Finance (credit card, IBAN, price), Content (sentence, paragraph, slug), and Misc (boolean, number, semver).
What export formats are available?↓
You can export as JSON (pretty-printed array of objects), CSV (with a header row and proper escaping), or SQL (a multi-value INSERT INTO statement ready to run against a database).
How many rows can I generate?↓
You can generate between 1 and 500 rows per run. For most testing and prototyping purposes 10–50 rows is sufficient, but larger datasets are supported for load testing or bulk imports.
Is the generated data realistic?↓
Yes — the tool uses Faker.js, the industry-standard library for generating realistic fake data. Names, addresses, emails, phone numbers, and other values follow real-world formats and patterns.
Is my data sent to a server?↓
No. All data generation happens entirely in your browser. No schemas, field names, or generated values are sent to any server or stored anywhere.
Can I reorder fields in my schema?↓
Yes — use the up and down arrows next to each field to reorder them. The column order in the table and export will match the order in your schema.