Mock Data Generator
Free online mock data generator with schema builder, blank percentage per column, AI field creation, and CSV/JSON/SQL/XML export. Generate realistic test data for APIs, databases, and QA in 50+ countries.
Quick start
Get test data in under a minute
Design custom test datasets without code. Add fields, set Blank % for optional empty cells, use AI-assisted field creation when available, and export JSON, CSV, SQL, or XML (up to 1,000 rows).
- 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.