What Is Fake Test Data? A Guide to Safe Mock Data for Testing and Demos
Updated: November 6, 2026 · AracMerkezi
▶ Open Fake Test Data Generator
When you test an application’s interface, API or report, you need data that fills it: a user list, an order table, email addresses. Typing them by hand is slow; copying real production data is both risky and often inappropriate. The solution is fake test data (mock/fake data). This guide shows how to design a good fake data set, how many records you need to test what, and when fake data is not enough.
Why not use real data?
Real customer data is personal data. Regulations such as KVKK (Turkey’s Personal Data Protection Law) in Turkey and GDPR in Europe restrict using this data outside its purpose, in unprotected environments. Test environments are usually not as well protected as production; data can leak through backups, screenshots and shared files. This article is not legal advice; for the details of the rules, consult your organization’s data protection officer. Technically the basic approach is simple: if you do not need real data for the test, do not use it.
Three approaches: fake, masked, anonymized
| Approach | Source | Upside | Watch out |
|---|---|---|---|
| Synthetic (fake) | Generated from scratch | No tie to a real person | May not reflect the real distribution |
| Masked | Fields of real data are scrambled | Structure is very close to the real thing | Remaining fields may identify a person |
| Anonymized | The link to identity is irreversibly removed | Suitable for analysis | Hard to do correctly; needs an expert |
The tool and examples in this article rely on the first approach, fictional data generated from scratch.
What does good fake data look like?
- Realistic format: Name, surname, city, age and date fields should be of the type the application expects.
- Variety: Long names, Turkish characters (ç, ğ, ı, İ, ö, ş, ü) and empty values reveal bugs.
- Safe domain names: Use
example.com,example.organdexample.netin email addresses. These domains are reserved by RFC 2606 and do not belong to real people; the same document also reserves the.test,.example,.invalidand.localhostsuffixes. A random@gmail.comaddress could reach a real person. - Obviously fictional: The data should not be presented as if it belonged to real people. Avoid generating realistic-looking ID numbers or phone numbers; they could belong to someone else.
A sample record
{"id": 1, "ad": "Elif", "soyad": "Kaya", "eposta": "elif.kaya42@example.com", "sehir": "Ankara", "yas": 29, "kayit_tarihi": "2025-03-12"}
From a record like this you can produce 5, 50 or 100 and try your interface’s pagination, sorting and filtering behavior.
How many records do you need? A pagination example
The number of records is not chosen at random; the behavior you want to test determines it. Consider a list that shows 20 records per page:
- 95 records: 95 / 20 = 4.75, rounded up to 5 pages; the last page has 95 − 4 × 20 = 15 records. This number tests the “last page is partly filled” case.
- 100 records: Exactly 5 pages; the last page is full. It is a boundary case, and an empty 6th page should not appear.
- 101 records: 6 pages; the last page has 1 record. This is the case where bugs show up most often.
Our tool generates 1–100 records; you can run the 101-record test by adding one record by hand.
Edge-case records
Add a few “hard” records by hand to the clean generated ones:
| Field | Normal value | Edge value |
|---|---|---|
| ad (first name) | Elif | Şükrü Ahmet Mehmet Çağlayan-Yıldızoğlu (very long) |
| soyad (surname) | Kaya | İĞDIR (capital İ and Ğ) |
| eposta (email) | elif@example.com | empty value (null) |
| yas (age) | 29 | 0 |
Turkish letters are especially valuable: in JavaScript, 'İĞDIR'.toLowerCase() gives “i̇ğdir” (with a combining dot character), while 'İĞDIR'.toLocaleLowerCase('tr') gives “iğdır”. The default sort puts “Ş” after “z”. These are real bugs that fake data can catch.
JSON or CSV?
- JSON: Natural for API tests and JavaScript applications; carries nested structures. For format errors, see the JSON guide.
- CSV: Suitable for table and import tests; opens with Excel and database tools. To convert CSV to JSON or JSON to CSV, use the JSON ↔ CSV Converter. There is also a CSV guide for details.
File size is also a test input: if you assume about 120 bytes per record, 1,000 records come to 120,000 bytes, about 117 KB (an illustrative assumption; real size depends on the fields). Estimates like this are useful for load tests.
Unique identifiers (UUID)
If records must be distinguishable from each other, you can use a UUID instead of a sequence number. The UUID Generator produces random v4 identifiers. Random identifiers are hard to guess, but outside of testing they are not a substitute for a security token.
On repeatability
Some libraries produce the same fake data every time with a “seed” value; this is useful when debugging. For example, in Python, after calling random.seed(7) the same random.choice sequence comes out identical on every run (we tried it: two runs gave the same list). The tool on our site uses the browser’s secure random generator, so it produces different data on every run. If you need the same data again, save the output to a file.
A practical test plan
- First check the interface by eye with a few (5–10) records.
- Then look at pagination, sorting and search behavior with 100 records.
- Add records by hand for edge cases: a very long name, an empty field, special characters.
- In bug reports, share these fake records instead of real personal data.
Common mistakes
- “Quickly” copying a table from production and loading it into the test environment.
- Generating fake emails on a real domain (such as gmail.com) so that test notifications reach real people.
- Testing only with clean records and not trying empty and very long fields.
- Showing fake data in a live environment as if it were real users.
- Assuming the generated data represents the real distribution.
Limits
Fake data tests only format and structure. For the oddities of real-world data (incorrect entries, old records, unexpected characters) you need to write extra scenarios. In security tests, performance measurements or data analysis work, the distribution of fake data may not represent real data; if the age field is generated with a uniform distribution, it does not reflect your real customer base. Also, using records that look like real people to create fake identities, to mislead or to commit fraud is neither legal nor ethical.
Tools
The Fake Test Data Generator produces 1–100 records; it outputs JSON or CSV and keeps emails in the example.com domain. To make the generated JSON readable, use the JSON Formatter. This article is general information; consult an expert for personal data rules.
Frequently asked questions
Can I use real customer data for testing?
It should generally be avoided; personal data protection rules create risk for test environments as well. For details, consult your organization’s data protection officer.
Which domain should be used in fake emails?
example.com, example.org or example.net; these are domains reserved by RFC 2606 that do not belong to real people.
Is fake data generated the same every time?
With libraries that support a seed, yes; the tool on our site generates different data on every run, so save the output if you need it again.
Tools mentioned in this guide
More guides
- What Is JSON? Structure, Formatting, Validation and Finding Errors – What is JSON and how do you read and validate it? A nested example, a valid/invalid comparison table, number and date traps and the formatting difference.
- How to Create a Secure Password: Length, Entropy and 8 Rules – How to create a secure password: password strength in bits, random-word passphrases, command-line generation and eight practical rules.
- What Are JSON, Base64 and URL Encoding? Encoding vs Encryption vs Hashing – What do JSON, Base64, URL encoding, HTML entities, SHA and JWT do? Encoding vs encryption vs hashing, with examples that were run and verified.
- How to Convert HEX to RGB Color Codes: Step-by-Step Examples – How to convert a HEX color code to RGB and back: hexadecimal basics, short and 8-digit HEX, darkening math and verified JavaScript and Python snippets.
- How Are Random Numbers Generated? Range Mapping, Repeat Probability and Fair Draws – How are random numbers generated and how do you hold a fair draw? Range-mapping formula, repeat probability, combination math and official-draw warnings.
This article is for general information only and is not legal, financial or medical advice. We are not an official institution.