Mock Data Generation
Automatically generate realistic test data with Faker.js integration
What is Mock Data?
Mock data is realistic, randomly generated test data that simulates real database records. It allows you to develop and test your frontend without needing a working backend or database.
Benefits of Mock Data
- ✓ No Backend Required: Start frontend development immediately
- ✓ Realistic Testing: Test with data that looks and feels real
- ✓ Edge Cases: Generate specific scenarios (empty lists, long text, etc.)
- ✓ Performance Testing: Create thousands of records instantly
- ✓ Consistency: Same data structure every time
Powered by Faker.js
Mock API Builder uses Faker.js, a powerful library with 100+ data generators for creating realistic mock data across various categories:
• Names (first, last, full)
• Emails
• Phone numbers
• Gender, job titles
• Bio, avatar URLs
• Street addresses
• Cities, states, countries
• ZIP codes
• Coordinates (lat/lng)
• Timezones
• Product names
• Prices, departments
• Colors, materials
• Product descriptions
• ISBN, barcodes
• Company names
• Catch phrases
• BS phrases
• Industry types
• Corporate suffixes
• Email addresses
• Usernames
• URLs, domains
• IP addresses
• User agents, emoji
• Past/future dates
• Recent/soon dates
• Birthdates
• Month, weekday names
• Timestamps
• Credit card numbers
• Account numbers
• Currency codes
• Bitcoin addresses
• IBAN, BIC codes
• Lorem ipsum text
• Paragraphs, sentences
• Words, lines
• Slugs
• Random text
How It Works
Define Your Schema
Create your data structure with field names and types
Smart Field Detection
The system automatically detects field purpose based on name
• "email" → faker.internet.email()
• "firstName" → faker.person.firstName()
• "city" → faker.location.city()
Set Record Count
Choose how many records to generate (1 to 10,000+)
• 10 records - Quick testing
• 100 records - Pagination testing
• 1,000+ records - Performance testing
Generate & Store
Data is generated and stored in your database
Field Name Detection
The system intelligently maps field names to appropriate Faker.js generators:
Field Name:
firstNameGenerated Value:
"John"Also detects: first_name, name, fullName, lastName
Field Name:
emailGenerated Value:
"john@example.com"Also detects: emailAddress, email_address
Field Name:
avatarGenerated Value:
"https://..."Also detects: image, photo, thumbnail, url, website
Field Name:
createdAtGenerated Value:
"2024-01-15T10:30:00Z"Also detects: updatedAt, birthdate, date, timestamp
Generation Options
Let the system automatically generate data based on your schema
Best for:
- • Quick prototyping
- • Standard data types
- • Getting started fast
Specify exact Faker.js methods for precise control
Best for:
- • Specific data requirements
- • Advanced use cases
- • Fine-tuned control
Manually create specific test cases or seed data
Best for:
- • Edge cases
- • Demo data
- • Specific scenarios
Real-World Examples
Best Practices
Clear field names help auto-detection work better:
✓ firstName,emailAddress,phoneNumber
✗ data1,field2,value
Generate 10-20 records first to verify the structure, then scale up to hundreds or thousands.
Auto-generate most data, then manually create a few edge cases (empty fields, very long text, special characters).
After updating your schema, regenerate mock data to match the new structure and avoid inconsistencies.
Create multiple endpoints with different data scenarios:
- •
/users- 100 normal users - •
/users/empty- Empty array (edge case) - •
/users/large- 10,000 users (performance)