Executive Summary
Testing modern applications demands high-quality, realistic data—yet manually creating hundreds or thousands of test records is impractical and error-prone. Using real production data introduces privacy risks and regulatory compliance issues that can be catastrophic for organizations. The Mock Data Generator & API Simulator solves this fundamental challenge by providing an intuitive, schema-based interface for generating realistic, customizable mock data in seconds.
This tool empowers developers, QA engineers, and data analysts to create comprehensive test datasets without writing a single line of code. Simply define your data structure using an intuitive visual schema builder, select from dozens of built-in data types (names, emails, addresses, dates, numbers, and more), and instantly generate datasets in JSON, CSV, or SQL format. With features like schema saving/loading, live preview, and flexible export options, the Mock Data Generator streamlines your entire testing workflow while maintaining complete data privacy through client-side processing.
Whether you’re populating a test database, mocking API responses, generating CSV files for import testing, or creating demonstration data for stakeholders, this tool delivers professional-quality synthetic data tailored to your exact specifications.
Feature Tour & UI Walkthrough
Schema Builder: The Heart of Data Generation
The schema builder provides a visual, form-based interface for defining your data structure field by field. Each field configuration includes:
Field Name: The column or property name in your output (e.g., “firstName”, “email”, “orderDate”)
Data Type Selection: Choose from 40+ built-in data types organized into categories:
- Identity: First names, last names, full names, usernames, suffixes
- Contact: Email addresses, phone numbers (various formats), domains
- Location: Street addresses, cities, states, countries, ZIP codes, latitudes, longitudes
- Business: Company names, job titles, departments, catchphrases, product names
- Dates & Time: Past dates, future dates, recent dates, month names, weekdays, timestamps
- Numbers: Integers, decimals, percentages, prices, account numbers
- Internet: URLs, IP addresses (IPv4/IPv6), MAC addresses, user agents, file paths
- Finance: Credit card numbers (test), IBAN, BIC, currency codes, transaction types
- Text: Lorem ipsum (words, sentences, paragraphs), random text, descriptions
- Boolean & Custom: True/false, custom enumerations, status codes
Type-Specific Options: Many data types include additional parameters. For example:
- Integer fields: min/max range
- Date fields: past days, future days, format
- Text fields: word/sentence/paragraph count
- Enum fields: custom comma-separated values
Live Preview Panel
As you configure fields, the preview panel instantly displays 3-5 sample records using your current schema. This real-time feedback lets you:
- Verify field types produce expected output
- Check data realism and variety
- Identify configuration errors before generation
- Understand how data will look in final export
Output Format Configuration
JSON Mode: Generates a properly formatted JSON array of objects, perfect for:
- API response mocking
- Frontend development fixtures
- NoSQL database seeding
- JavaScript/TypeScript testing
CSV Mode: Creates standard comma-separated values with header row, ideal for:
- Spreadsheet imports (Excel, Google Sheets)
- Database bulk loading
- Data analysis tools
- Legacy system integration
SQL Mode: Produces executable INSERT statements, ready for:
- Relational database seeding (MySQL, PostgreSQL, SQL Server)
- Migration testing
- Development environment setup
- Rapid prototyping
Quantity Control
Specify the exact number of records to generate, from a single record for quick testing to thousands for load testing and performance validation. The tool handles bulk generation efficiently without browser performance degradation.
Schema Management Features
Save Schema: Export your complete schema definition as a reusable JSON file. Store it in version control, share it with team members, or maintain a library of standard schemas for different testing scenarios.
Load Schema: Import previously saved schemas with a single click, eliminating repetitive configuration. Perfect for:
- Daily test data regeneration
- Cross-project consistency
- Team standardization
- Onboarding new developers
Schema Library: Build a collection of schemas for common entities:
- User profiles (basic, extended, admin)
- Product catalogs (e-commerce, SaaS, inventory)
- Transaction records (orders, payments, invoices)
- Event logs (audit trails, analytics, monitoring)
Download and Copy Options
Generated data can be:
- Copied to clipboard for immediate pasting into code, tests, or terminals
- Downloaded as a file with automatic naming based on format and timestamp
- Previewed in-browser for verification before export
Step-by-Step Usage Scenarios
Scenario 1: Creating Test Users for Authentication Testing
Goal: Generate 50 diverse user profiles for testing a login system
Steps:
-
Build User Schema
- Add field:
userId→ Integer (1000-9999) - Add field:
username→ Username - Add field:
email→ Email Address - Add field:
password_hash→ Hash (represents bcrypt hash) - Add field:
firstName→ First Name - Add field:
lastName→ Last Name - Add field:
accountStatus→ Enum (active, suspended, pending, deleted) - Add field:
createdAt→ Past Date (365 days) - Add field:
lastLogin→ Recent Date (30 days) - Add field:
emailVerified→ Boolean
- Add field:
-
Configure and Generate
- Review preview to verify realistic data
- Set record count: 50
- Select format: JSON
- Click “Generate Data”
-
Export and Use
- Copy JSON array to clipboard
- Paste into test file:
test/fixtures/users.json - Import into test suite
Example Output:
[
{
"userId": 7423,
"username": "sarah_martinez",
"email": "sarah.martinez@example.com",
"password_hash": "$2b$10$xQs...",
"firstName": "Sarah",
"lastName": "Martinez",
"accountStatus": "active",
"createdAt": "2024-03-15",
"lastLogin": "2024-10-28",
"emailVerified": true
}
// ... 49 more users
]
Integrate with the JSON Hero Toolkit to validate structure and visualize the data tree.
Scenario 2: Generating E-Commerce Product Data
Goal: Create a CSV file with 200 product listings for import testing
Steps:
-
Design Product Schema
SKU→ Product Code (8 characters)Product_Name→ Product NameCategory→ Enum (Electronics, Home, Clothing, Sports, Books)Brand→ Company NamePrice→ Decimal (9.99-999.99, 2 decimals)Stock_Quantity→ Integer (0-500)Is_Featured→ BooleanAdded_Date→ Past Date (180 days)Weight_Kg→ Decimal (0.1-25.0)Description→ Lorem Ipsum (1-2 sentences)
-
Generate CSV
- Preview to check realistic product combinations
- Set count: 200
- Format: CSV
- Generate and download
products_import.csv
-
Test Import Feature
- Upload CSV to your application’s import interface
- Verify parsing, validation, and database insertion
- Check edge cases (minimum price, zero stock, special characters)
Use this alongside the Polyglot Data Converter if you need to convert CSV to JSON or other formats.
Scenario 3: Database Seeding with SQL
Goal: Populate a development database with realistic customer records
Steps:
-
Create Customer Schema
customer_id→ UUIDcompany_name→ Company Namecontact_person→ Full Nameemail→ Email Addressphone→ Phone Numberaddress→ Street Addresscity→ Citystate→ Statepostal_code→ ZIP Codecountry→ Countryaccount_balance→ Decimal (-5000 to 50000)credit_limit→ Integer (5000, 10000, 25000, 50000)created_date→ Past Date (730 days)
-
Generate SQL INSERT Statements
- Select format: SQL
- Generate 100 records
- Customize table name to match your schema:
INSERT INTO customers ...
-
Execute in Database
- Download as
seed_customers.sql - Run script in development database
- Verify records inserted correctly
- Download as
Example SQL Output:
INSERT INTO customers (customer_id, company_name, contact_person, email, phone, address, city, state, postal_code, country, account_balance, credit_limit, created_date) VALUES
('f47ac10b-58cc-4372-a567-0e02b2c3d479', 'TechCorp Solutions', 'Michael Johnson', 'm.johnson@techcorp.com', '555-0123', '742 Oak Avenue', 'San Francisco', 'CA', '94102', 'USA', 12450.75, 25000, '2023-06-15'),
('8c7b0c83-42d5-4f2a-8b3f-9a7c1e4d2b5a', 'Global Imports Ltd', 'Emma Williams', 'e.williams@globalimports.co.uk', '555-0456', '89 High Street', 'London', 'England', 'WC2N 5DU', 'UK', -350.00, 10000, '2024-01-20');
Code Examples and Integration Patterns
Example 1: Integration Testing with Jest
// test/integration/user-api.test.js
import mockUsers from '../fixtures/generated-users.json';
import { UserService } from '@/services/UserService';
describe('User Service Integration Tests', () => {
let userService;
beforeEach(() => {
userService = new UserService();
// Seed test database with generated mock data
database.users.insertMany(mockUsers);
});
afterEach(() => {
database.users.deleteAll();
});
test('should retrieve user by email', async () => {
const testUser = mockUsers[0];
const result = await userService.findByEmail(testUser.email);
expect(result.email).toBe(testUser.email);
expect(result.firstName).toBe(testUser.firstName);
});
test('should handle non-existent user', async () => {
const result = await userService.findByEmail('nonexistent@test.com');
expect(result).toBeNull();
});
});
Example 2: Frontend Component Development
// src/components/UserList.stories.tsx
import { Meta, StoryObj } from '@storybook/react';
import { UserList } from './UserList';
import mockUsers from '@/mocks/generated-users.json';
const meta: Meta<typeof UserList> = {
title: 'Components/UserList',
component: UserList,
};
export default meta;
// Story with realistic generated data
export const WithManyUsers: StoryObj<typeof UserList> = {
args: {
users: mockUsers,
loading: false,
},
};
// Story with empty state
export const EmptyState: StoryObj<typeof UserList> = {
args: {
users: [],
loading: false,
},
};
Example 3: API Mocking with MSW
// src/mocks/handlers.js
import { rest } from 'msw';
import generatedProducts from './generated-products.json';
export const handlers = [
rest.get('/api/products', (req, res, ctx) => {
const page = parseInt(req.url.searchParams.get('page') || '1');
const limit = parseInt(req.url.searchParams.get('limit') || '20');
const start = (page - 1) * limit;
const end = start + limit;
return res(
ctx.status(200),
ctx.json({
data: generatedProducts.slice(start, end),
total: generatedProducts.length,
page,
limit,
})
);
}),
];
This mock handler uses generated product data to simulate a paginated API, allowing frontend development to proceed without backend dependencies.
Troubleshooting & Limitations
Common Issues and Solutions
Problem: “Data looks unrealistic or repetitive”
Solution: The built-in data generators have limited variation for some types. To increase diversity:
- Generate larger datasets (more records = more variation)
- Mix data types (use both “Product Name” and “Company Name” for variety)
- Include unique identifiers (UUIDs, sequential IDs) to ensure distinctness
- Combine fields creatively (e.g., use “FirstName + Department” for unique usernames)
Problem: “Generated SQL doesn’t work with my database”
Solution: SQL dialect differences can cause issues:
- Review generated SQL and adjust syntax for your database (PostgreSQL vs MySQL vs SQL Server)
- Add explicit table names: modify
INSERT INTOstatements - Check escaping: some databases require different quote styles
- Consider using an ORM or database-specific import tool instead of raw SQL
Problem: “Can’t generate complex related data”
Solution: The tool generates independent records without relationships. For related data:
- Generate parent records first (e.g., users)
- Note generated IDs (if using sequential numbers)
- Generate child records (e.g., orders) separately
- Use scripting to establish foreign key relationships
- Alternatively, use DataForge Mock Data Generator which offers more advanced schema features
Problem: “Browser slows down or crashes with large datasets”
Solution: Browser memory is finite:
- Generate in batches (max 5,000-10,000 records per generation)
- Download/clear frequently rather than accumulating data
- For very large datasets (50k+), use command-line tools like Faker.js or Bogus
Current Limitations
- No data relationships: Each record is independent; foreign keys must be manually managed
- Limited customization: Some data types don’t allow fine-grained control
- Client-side only: Large-scale generation (millions of records) requires server-side tools
- No API simulation endpoints: Unlike dedicated API mocking tools, this generates static data files only
- Schema complexity: Very complex business rules (e.g., “price must be 10% more than cost”) aren’t supported
Best Practices for Reliability
✅ Validate before using: Always check generated data with a few records before bulk generation ✅ Save schemas: Store schema JSON files in version control for reproducibility ✅ Document purpose: Add comments in schema files explaining what each configuration represents ✅ Test with edge cases: Generate separate datasets for min values, max values, nulls, and special characters ✅ Combine with validation tools: Use JSON Hero Toolkit or CSV validators to verify output structure
Frequently Asked Questions
What’s the difference between this tool and DataForge Mock Data Generator?
Both generate test data, but with slightly different focuses:
- Mock Data Generator & API Simulator emphasizes quick, simple data generation with immediate results
- DataForge offers more output formats (XML, YAML), advanced schema features, and better handling of complex scenarios
For most standard testing needs, both tools are excellent choices. DataForge provides more formats, while this tool focuses on simplicity and speed.
Can I use this for production data?
Absolutely not. Generated data is synthetic and for testing only. It should never be used in production systems or mixed with real user data. Always maintain clear separation between test and production environments.
Is my data secure?
Yes. This tool runs entirely in your browser (client-side processing). Generated data and schema configurations are never uploaded to any server. When you close the tab, everything is gone unless you explicitly save it.
Can I modify generated data before downloading?
Not directly in the tool. After generation, you can:
- Copy to clipboard and paste into a text editor for manual editing
- Download and edit the file with appropriate tools (JSON editors, CSV editors, SQL clients)
- Use the Polyglot Data Converter for format transformations
How do I create data with foreign key relationships?
Generate related datasets separately, then use scripting to link them:
- Generate parent records (e.g., 100 users)
- Note generated IDs (1-100 if using sequential integers)
- Generate child records (e.g., 500 orders)
- Write a script to randomly assign user IDs (1-100) to orders’
userIdfield - Import the modified data
Can I automate this in CI/CD pipelines?
This is a browser-based tool, so direct automation isn’t possible. However:
- Save schemas in your repository
- Generate fixtures manually when schemas change
- Commit generated fixtures to version control
- CI/CD pipelines use the committed fixtures
For full automation, consider command-line tools like Faker.js or Bogus that can be integrated directly into build scripts.
How many different data types are available?
Over 40 built-in data types covering:
- Personal information (names, contacts, demographics)
- Business data (companies, products, transactions)
- Technical data (IPs, URLs, UUIDs, file paths)
- Financial data (credit cards, currency, IBAN)
- Temporal data (dates, times, timestamps)
- Geographic data (addresses, coordinates, regions)
- Text (Lorem Ipsum, descriptions, paragraphs)
- Numbers, booleans, and custom enums
Can I request new data types?
While this tool provides a fixed set of types, you can often combine existing types creatively or use custom enum fields for specific values. For advanced customization, programmatic libraries offer unlimited flexibility.
References & Internal Links
Related Gray-wolf Tools
- DataForge Mock Data Generator: Advanced mock data generation with XML and YAML support
- JSON Hero Toolkit: Validate, format, and explore generated JSON data
- Polyglot Data Converter: Convert generated data between JSON, YAML, XML, and TOML formats
- Advanced Diff Checker: Compare different versions of generated datasets
External Resources
- Faker.js Documentation - Leading JavaScript library for programmatic fake data generation
- Mockaroo - Commercial online mock data service with advanced features
- Test Data Management Best Practices - Comprehensive guide to test data strategies
Accessibility Considerations
The Mock Data Generator & API Simulator is designed to be fully accessible:
- Keyboard Navigation: All controls accessible via keyboard (Tab, Enter, Arrow keys)
- Screen Reader Support: Proper ARIA labels on all form controls and buttons
- High Contrast: Clear visual hierarchy with sufficient color contrast ratios
- Focus Management: Visible focus indicators for keyboard users
- Semantic HTML: Proper heading structure and landmark regions
For optimal screen reader experience, navigate the schema builder sequentially using Tab key. Field configurations are grouped logically, and the preview panel updates are announced to assistive technologies.
Last Updated: November 3, 2025
Word Count: 3,287 words
Category: Developer & Programming Tools