Mock Data Generator
Generate realistic fake data for testing and development.
About this tool
Mock Data Generator creates realistic fake data for testing and development—names, emails, phone numbers, addresses, credit cards, and more—all without leaving your browser. It's essential for developers building software who need convincing test data without manually typing or using privacy-violating real datasets.
Simply select the data type you need, choose how many rows to generate, and download the results as CSV, JSON, or plain text. The tool supports multiple locales so you can generate names, addresses, and phone numbers that match your target region or language. Customize the output format to fit your testing requirements.
All data is generated locally on your device using randomization algorithms—nothing is stored, logged, or sent to any server. This makes it fast, private, and perfect for offline use in development environments where you need seed data for databases, API testing, or UI demonstrations.
Frequently Asked Questions
Code Implementation
import random
import uuid
import json
FIRST_NAMES = ["Alice", "Bob", "Carol", "David", "Emma", "Frank", "Grace", "Henry"]
LAST_NAMES = ["Smith", "Johnson", "Williams", "Brown", "Jones", "Garcia", "Miller"]
CITIES = ["New York", "London", "Tokyo", "Paris", "Berlin", "Seoul", "Sydney"]
COUNTRIES = ["USA", "UK", "Japan", "France", "Germany", "South Korea", "Australia"]
DOMAINS = ["gmail.com", "yahoo.com", "outlook.com", "example.com"]
COMPANIES = ["Acme Corp", "Globex", "Initech", "Hooli", "Dunder Mifflin"]
def generate_record(fields: list[str]) -> dict:
fn = random.choice(FIRST_NAMES)
ln = random.choice(LAST_NAMES)
record = {}
for field in fields:
if field == "firstName": record["firstName"] = fn
elif field == "lastName": record["lastName"] = ln
elif field == "email": record["email"] = f"{fn.lower()}.{ln.lower()}@{random.choice(DOMAINS)}"
elif field == "phone": record["phone"] = f"+1-{random.randint(200,999)}-{random.randint(100,999)}-{random.randint(1000,9999)}"
elif field == "city": record["city"] = random.choice(CITIES)
elif field == "country": record["country"] = random.choice(COUNTRIES)
elif field == "age": record["age"] = random.randint(18, 80)
elif field == "uuid": record["uuid"] = str(uuid.uuid4())
elif field == "company": record["company"] = random.choice(COMPANIES)
return record
# Generate 10 records with name and email
fields = ["firstName", "lastName", "email", "age", "city"]
data = [generate_record(fields) for _ in range(10)]
print(json.dumps(data, indent=2))Comments & Feedback
Comments are powered by Giscus. Sign in with GitHub to leave a comment.