Mock Data Generator
Mock Data Generator — Generate Mock Data, SQL & AI
Free online · Instant results · No signup
Free online. Instant results. Mock data generator, random data generator & random sample data generator. Custom schema, SQL/JSON/CSV export free in browser.
Quick start
Get test data in under a minute
Free mock data generator to generate mock data from a custom schema—export JSON, CSV, SQL, or XML (up to 1,000 rows). Built-in SQL mock data export, AI column suggestions from samples, Blank % for nullable fields, and no signup.
- 1Add or reorder fields; pick a type for each column.
- 2Set Blank % on optional fields (e.g. 15% empty phone numbers).
- 3Choose row count, format, and country; configure CSV options if needed.
- 4Generate, preview rows, then download your file.
Documentation
Mock Data Generator guide
Learn how to build schemas, use blank percentages, export CSV/JSON, and generate realistic test data for your stack.
What is a mock data generator?
A mock data generator creates realistic but fictional records for software testing, API prototyping, database seeding, and UI design. Instead of copying production data—which risks privacy violations and compliance fines—teams build a schema that describes each column (name, type, and rules) and export thousands of rows in formats like JSON, CSV, SQL, or XML.
Fake Data Hub’s Mock Data Generator is a browser-based schema builder. You define field names, pick from more than thirty data types (names, emails, UUIDs, currencies, dates, custom value lists, and more), set optional blank percentages per column, choose a country locale for regional names and addresses, and download up to one thousand rows without installing software.
Whether you are a backend developer seeding PostgreSQL, a QA engineer filling regression forms, or a product manager demoing a dashboard, this tool helps you produce varied, production-shaped datasets in minutes.
What does Blank % mean?
0% — always filled
id, order_id
10% — mostly present
25% — often empty
phone, username
Blank % (blank percentage) controls how often a field is left empty in generated output. It is a number from 0 to 100. At 0%, every row includes a value for that field. At 10%, roughly one in ten rows will have an empty cell—useful for optional form fields, nullable database columns, or incomplete CRM records.
For each row, the generator rolls a random number. If it falls below your blank percentage, that field returns null (JSON), an empty CSV cell, SQL NULL, or an empty XML element. This mimics real-world data quality issues so your validation, import pipelines, and UI empty states are tested before launch.
Common examples: set phone to 15% blank when not every user shares a number; set middle_name or secondary_email to 40% blank; set shipped or trial_ends to 20% blank for nullable flags and dates. Required identifiers (id, uuid, order_id) should usually stay at 0%.
In CSV exports, blank values appear as empty cells between commas. In JSON, they appear as null. SQL INSERT statements use NULL. Turn on the header row and UTF-8 BOM options when opening CSV files in Microsoft Excel.
How to use the Mock Data Generator step by step
- 1
Load a preset or start fresh. Open the tool and choose Load preset for templates such as standard users, e-commerce orders, HR employees, flight logs, or CRM leads. Each preset includes sensible field names, types, and blank percentages where optional data is common.
- 2
Customize your schema. Edit field names to match your API or database columns. Change the type dropdown to match each column’s data (Email Address, Integer, Custom Values, Sequence, etc.). Use the up and down arrows to reorder columns. Set Blank % per field when values are optional.
- 3
Use AI for new fields (optional). Click Generate fields using AI, describe your domain (for example “hospital patient admissions” or “warehouse inventory”), set how many fields you want, or paste sample CSV, JSON, or XML. Choose Add fields to append columns or Replace existing fields to rebuild the schema.
- 4
Configure export settings. Set Rows (1–1000), pick Format (JSON, CSV, SQL, XML), and select Country for locale-aware names and addresses (United States is the default). For CSV, enable Header row and UTF-8 BOM for Excel. For SQL, set your table name.
- 5
Generate and preview. Click Generate data. The Preview tab shows every row in a scrollable table. The Export tab shows the raw file content. Use Copy, Download CSV, or Download JSON/CSV/SQL/XML to save results.
- 6
Save your schema. Click Save schema to store field definitions in your browser’s local storage so you can return later without rebuilding from scratch.
Supported field types
Identity and contact types include First Name, Last Name, Full Name, Email Address, Username, Password, Phone, Street Address, City, State / Region, Postal Code, Country, Full Address, and Gender.
Technical types include Row Number, UUID v4, Boolean, Integer, Decimal, Date, Date Time, Age, URL, IPv4, Hex Color, and Sequence (incrementing IDs with configurable start and step).
Business types include Company, Job Title, Currency (USD), and Credit Card (test)—standard PCI sandbox numbers only, never real card data.
Content types include Sentence and Paragraph for lorem-style text. Custom Values lets you provide a comma-separated list; each row randomly picks one entry—ideal for status, plan tier, or department enums.
Integer, Decimal, Currency, and Age types accept min/max in the Options column to control realistic ranges.
Export formats: JSON, CSV, SQL, and XML
JSON exports an array of objects keyed by your field names—ready for Postman, frontend mocks, MongoDB imports, or Node.js fixtures. Pretty-printed formatting makes diffing and code review easy.
CSV produces spreadsheet-ready files. Fake Data Hub quotes cells that contain commas or line breaks. The dedicated Download CSV button works even when another format is selected for preview. Header row adds column names on line one; UTF-8 BOM helps Excel detect encoding on Windows.
SQL generates INSERT statements with a table name you provide. String values are escaped for single quotes; booleans and numbers are written as literals; blank fields become NULL.
XML wraps each row in a record element with child tags matching your field names. Empty values can use nil attributes when blank percentage applies.
AI-powered field generation
When AI field suggestions are enabled on the server, Fake Data Hub can infer columns from your topic or sample data and return field names, types, and suggested blank percentages. If AI is unavailable, the tool falls back to parsing CSV headers, JSON keys, or keyword-based templates (flight logs, social media, stock trades, and more).
Pasting example data is the fastest way to mirror an existing API contract: copy the first line of a CSV export, a single JSON object, or a small XML snippet, and the inferred schema aligns column names with appropriate types.
Who uses mock data generators?
Software developers seed local and staging databases, run migration tests, and benchmark queries with realistic volume without touching production.
QA and test engineers validate forms, imports, pagination, sorting, and error handling when cells are missing or malformed.
Data engineers prototype ETL mappings and test null-handling rules before connecting to live sources.
Designers and product teams populate Figma-linked prototypes, demo environments, and investor decks with believable numbers and names.
Educators teach SQL, APIs, and data modeling with safe synthetic datasets students can share publicly.
Best practices for realistic test data
Match field names to your production schema so imports and API contracts stay aligned. Use snake_case or camelCase consistently with your codebase.
Apply blank percentages only to nullable or optional columns. Keep primary keys and required foreign keys at 0% blank.
Pick a country locale that matches your target users—United States, United Kingdom, India, Germany, and fifty-plus others affect names, phone formats, and addresses.
Generate enough rows to stress-test performance (hundreds or the full 1,000 limit) but start small while iterating on schema design.
Never use generated credit card or national ID values for real transactions or KYC; they are formatted for sandbox testing only.
Combine this tool with Fake Data Hub’s JSON Generator, CSV tools, UUID Generator, and Random Identity Generator when you need both custom schemas and one-click personas.
Mock Data Generator vs fixed JSON or CSV tools
Fixed generators output a predetermined column set. The Mock Data Generator is schema-first: you control every column, type, blank rate, and export format. That flexibility matches enterprise test-data platforms while remaining free and browser-based.
Compared to writing custom scripts with data-factory libraries, the visual builder requires no code for product managers and designers, while developers still benefit from quick CSV and SQL downloads during spikes.
Quick answers
Maximum rows per generation: 1,000 in the browser. No account required for standard use. Data is generated locally in your session; schemas can be saved to localStorage on your device.
Blank % applies independently per field per row—setting 10% on email and 20% on phone does not correlate blanks across columns unless you regenerate many rows and observe statistical distribution.
For United States-focused apps, leave Country on United States (default). Switch before generating if you need UK postcodes, Indian phone patterns, or other regional formats.
Common Use Cases
Staging data and developer workflows
A backend developer seeding a staging database pastes mock data generator output into SQL scripts or JSON fixtures instead of exporting production rows. The Mock Data Generator keeps compliance teams comfortable because every value is fictional yet shaped for real UI fields.
QA and form validation
QA engineers running regression on checkout or signup flows regenerate mock data generator batches until field length, charset rules, and duplicate detection behave correctly. Copy one line or fifty without writing a Faker.js script for a quick manual test pass.
Design mockups and prototypes
Product designers drop Mock Data Generator results into Figma tables, Notion specs, or slide decks so stakeholders review realistic screens before copywriters deliver final text. Regenerate until tone and length fit the component grid.
Demos and screenshots
Sales engineers capture CRM, admin, or developer tools screenshots with believable placeholder content. The Mock Data Generator avoids blank states and lorem ipsum that make demos feel unfinished.
Documentation and training
Technical writers embed mock data generator examples in internal runbooks and onboarding guides. Trainees practice with safe sample data that mirrors production field shapes without exposing customer information.
Why Use Fake Data Hub?
Fake Data Hub keeps mock data generator free in the browser—no signup wall, no install, and no rate limits on standard regeneration. This page is one of 160+ generators on the same domain, so you can build full test personas, mock APIs, and placeholder copy without juggling separate websites. Every field is synthetic data meant for QA and demos, not real people or live accounts.
Frequently Asked Questions
What is a random data generator?
A random data generator usually means multi-column sample files (names, emails, numbers). Use this Mock Data Generator for CSV, JSON, and SQL. Use the Random Date Generator when you only need calendar date strings.
What is a random sample data generator?
Same as mock data: define a schema, set row count, export a sample dataset for QA. Up to 1,000 rows per run in the browser.
What is a mock data generator?
A mock data generator builds fake rows that match your schema—names, emails, dates, IDs—for staging databases and APIs without copying production. Fake Data Hub lets you define columns, set Blank %, and export JSON, CSV, SQL, or XML in the browser.
How do I generate mock data?
Add fields and types, set row count and country if needed, click Generate, preview rows, then download. Use Generate mock data workflows for one-off QA sets up to 1,000 rows per run—no code required.
Is this a SQL mock data generator?
Yes. After defining your schema, choose SQL export to get INSERT statements for MySQL, PostgreSQL, or SQLite tests—alongside CSV and JSON from the same field layout.
Is this an AI mock data generator?
Yes: paste sample CSV/JSON or describe your domain and built-in templates suggest columns. Core row generation runs in the browser with local datasets only.
What does Blank % do on each field?
Blank % is the chance a field is empty in a row—useful for nullable phone or middle name columns. Keep required IDs at 0%.
How do I download CSV for Excel?
Choose CSV export and enable UTF-8 BOM if Excel mangles accents. Open the downloaded file in Excel or Google Sheets.
Can I export SQL INSERT statements?
Yes. Pick SQL format after defining your schema to get statements ready for MySQL, Postgres, or SQLite tests.
What is the row limit?
Up to 1,000 rows per generation for browser performance—enough for most QA datasets.
Can AI suggest columns from a sample file?
When enabled, paste sample CSV/JSON and the tool proposes fields—review types before generating.
How is this different from Mockaroo?
We focus on free in-browser schema building with Blank %, multi-format export, and no account—without targeting the head term “mockaroo”.
Can I reorder columns?
Yes. Drag or reorder fields so export column order matches your API contract.
Is country selection global per dataset?
Country applies to locale-aware field types (names, addresses) across all rows in that run.
Is the Mock Data Generator free?
Yes for standard browser generation on Fake Data Hub.
Can I get XML and JSON from the same schema?
Yes. Switch export format and regenerate—the field definition stays the same.
Is this a free mock data generator unlimited?
You can regenerate and export up to 1,000 rows per run in the browser—enough for most QA datasets without a paid Mockaroo plan.
Can I use this as a database mock data generator?
Yes. Export SQL INSERTs or CSV for MySQL, Postgres, or SQLite seeds, or JSON for API fixtures from one custom schema.
What is the maximum number of rows?
Up to 1,000 rows per generation in the browser.
Are credit card numbers real?
No. Card fields use standard PCI test formats for sandbox testing only.