Fake Data Generator
Generate random user data for testing.
Configuration
About the Fake Data Generator
Hard-coded "Test User" rows hide bugs. They never have a hyphenated surname, an email with digits in it, a phone number with an extension or a company name containing a comma, so the layout, the CSV importer and the SQL escaping all look fine until real data arrives. This generator uses the Faker.js library (the @faker-js/faker package) inside your browser to produce plausible synthetic records: up to 50 rows per batch, with any combination of six fields, exported as JSON, CSV or SQL INSERT statements.
Nothing you generate is stored or transmitted. Every click on Generate produces a fresh random batch, so copy the output if you want to keep a particular set.
What each field produces
| Field | Library call | Example | Worth knowing |
|---|---|---|---|
| name | person.fullName() | Samuel Beahan-Hermiston | First and last name; hyphenated surnames appear regularly, which is good for width testing. |
internet.email() | Gonzalo_Mueller83@gmail.com | Built from a random name at gmail.com, hotmail.com or yahoo.com. See the warning below. | |
| phone | phone.number() | 218.254.3567 x1211 | US-style formats: dashes, dots, a leading 1, and extensions such as x524. Not E.164. |
| address | location.streetAddress() | 6940 Ernser Extension | Street line only; no city, state, country or postal code. |
| company | company.name() | Reilly, Jenkins and Lubowitz | Often contains commas, so it exercises CSV quoting. |
| uuid | string.uuid() | random version 4 UUID | Useful as a primary key. See the UUID generator for other versions. |
Generated emails use real provider domains
The addresses end in gmail.com, hotmail.com or yahoo.com, and a generated local part can coincide with a real mailbox. Never point a mail-sending job at this data. Either replace the domain withexample.com (reserved for documentation and testing by RFC 2606) with a find-and-replace, or run your test environment against a mail sink such as Mailpit or MailHog that captures outbound mail instead of delivering it.Output formats and their quirks
- JSON is a pretty-printed array of objects. Keys appear in the order the fields are listed in the form (name, email, phone, address, company, uuid), which is also the order used by the other two formats.
- CSV starts with a header row and wraps every value in double quotes, so the commas inside company names are safe. A double quote inside a value is not escaped by doubling, so check the output before feeding it to a strict parser. The CSV converter will tell you if a row is malformed.
- SQL emits one
INSERT INTO users (...) VALUES (...);statement per row. Single quotes inside values are doubled, which is the ANSI SQL escape and works in PostgreSQL, MySQL, SQLite and SQL Server. The table name is fixed tousers; rename it with find-and-replace. NoCREATE TABLEstatement is generated, so the target table must already exist with matching column names.
Locale: the output is US-English
The generator uses the library's default English locale. That means you will not get Indian names, +91 mobile numbers, six-digit PIN codes or state names, and phone numbers follow North American patterns. If you need locale-specific fixtures, the same library ships locale exports: in code, import { fakerEN_IN } from '@faker-js/faker' produces Indian first names and surnames, Indian city names and phone numbers in +91 format, and the Python Faker package accepts Faker('en_IN'). For anything a locale does not cover, a small template of your own is the reliable option, such as a random digit from 6 to 9 followed by nine more digits for a mobile number.
Why synthetic data instead of a copy of production
Copying real customer rows into a test database is the fastest way to leak personal data. Test environments are backed up less carefully, screenshots of them end up in tickets and chat, and logs are shared with vendors. India's Digital Personal Data Protection Act, 2023 and the EU GDPR both treat that data as still personal, wherever it sits. Masking a production dump is hard to get right (a masked name next to an unmasked email still identifies the person), whereas synthetic rows carry no risk at all.
Synthetic data also tests things production dumps rarely contain: the longest plausible name in your layout, an address on one line, a phone number with an extension, or 50 rows with identical company names. If you need a realistic distribution (many customers in one city, a few with very long names) generate a large batch in code and shape it there.
Reproducible fixtures in code
The web form has no seed control, so each batch is different. In a test suite you usually want the opposite: the same fixtures on every run. Both the JavaScript and Python libraries support seeding, and the JavaScript one provides a safe email helper that uses the example.com family of domains:
// JavaScript (Node.js): npm install @faker-js/faker
import { faker } from '@faker-js/faker';
faker.seed(42); // same rows every run
const users = Array.from({ length: 500 }, () => ({
id: faker.string.uuid(),
name: faker.person.fullName(),
email: faker.internet.exampleEmail(), // always @example.com/.org/.net
}));
# Python: pip install Faker
from faker import Faker
fake = Faker('en_IN'); Faker.seed(42)
print(fake.name(), fake.city())The 50-row limit on this page keeps the browser responsive and the output readable. For thousands of rows, loop in code as above and write straight to a file.
How to use
- Tick the fields you need: name, email, phone, address, company and uuid can be combined freely.
- Set the row count, from 1 to 50 per batch.
- Choose JSON, CSV or SQL as the output format. SQL produces INSERT statements for a table called users.
- Click Generate Data, then Copy to put the result on the clipboard. Each click produces a new random batch.
- Before sending any email in a test, replace the generated domains with example.com.
Common use cases
- Seeding a development database with plausible users for a sign-up or checkout demo.
- Building JSON fixtures for unit tests that need more than one shape of name and email.
- Checking that a table, card or dropdown copes with long and hyphenated names.
- Producing a sample CSV to test an import feature, including commas inside quoted values.
- Generating INSERT statements to populate a users table in a sandbox schema.
- Filling a load-test payload with varied records instead of the same user repeated.
Frequently asked questions
Is any of this data real?
Can I send email to the generated addresses?
Can it generate Indian names, +91 numbers or PIN codes?
Can I get the same data again?
Why is the maximum 50 rows?
Is the CSV output safe to import?
How do I change the SQL table name?
Can I use generated data in a production demo tenant?
Advertisement