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

FieldLibrary callExampleWorth knowing
nameperson.fullName()Samuel Beahan-HermistonFirst and last name; hyphenated surnames appear regularly, which is good for width testing.
emailinternet.email()Gonzalo_Mueller83@gmail.comBuilt from a random name at gmail.com, hotmail.com or yahoo.com. See the warning below.
phonephone.number()218.254.3567 x1211US-style formats: dashes, dots, a leading 1, and extensions such as x524. Not E.164.
addresslocation.streetAddress()6940 Ernser ExtensionStreet line only; no city, state, country or postal code.
companycompany.name()Reilly, Jenkins and LubowitzOften contains commas, so it exercises CSV quoting.
uuidstring.uuid()random version 4 UUIDUseful 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 with example.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 to users; rename it with find-and-replace. No CREATE TABLE statement 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

  1. Tick the fields you need: name, email, phone, address, company and uuid can be combined freely.
  2. Set the row count, from 1 to 50 per batch.
  3. Choose JSON, CSV or SQL as the output format. SQL produces INSERT statements for a table called users.
  4. Click Generate Data, then Copy to put the result on the clipboard. Each click produces a new random batch.
  5. 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?

No. Names, emails, phone numbers, addresses and company names are assembled at random from the word lists inside the Faker.js library. Any resemblance to a real person or business is coincidental.

Can I send email to the generated addresses?

Do not. They use real domains (gmail.com, hotmail.com, yahoo.com) and could reach a real inbox. Replace the domain with example.com, which is reserved for testing, or capture outbound mail with a sink such as Mailpit in your test environment.

Can it generate Indian names, +91 numbers or PIN codes?

Not on this page, which uses the default English locale with US-style phone and address formats. In code, the fakerEN_IN export of Faker.js gives Indian names, cities and +91 phone numbers, and the Python Faker package has an en_IN locale. For anything a locale does not cover, a small custom template is the reliable option.

Can I get the same data again?

Not from the web form; every click is a new random batch, so copy the output you want to keep. In code, call faker.seed(number) before generating and the sequence becomes repeatable.

Why is the maximum 50 rows?

To keep generation instant and the on-screen output readable. If you need thousands of rows, use the library directly in a script; the snippet above writes any number of records.

Is the CSV output safe to import?

Every value is wrapped in double quotes, so commas inside company names are handled. A double quote inside a value is not escaped, which is rare with generated data but worth a quick check in a strict importer.

How do I change the SQL table name?

The statements always target a table named users. Use find-and-replace on the copied output, and make sure your table has columns with the same names as the fields you ticked.

Can I use generated data in a production demo tenant?

Yes, as long as your own terms allow synthetic accounts and no email is sent to the generated addresses. Synthetic rows are safer there than a masked copy of real customers.

Advertisement