Mock Data Generator
Generate test data from a list of fields: names, emails, dates, numbers and more, as JSON, CSV or SQL.
Runs in your browser Your input never leaves your device.
Report a problem with this tool
About this tool
Write one field per line in the box, in the form name: type or name: type(arguments). A line with only a type, such as email, uses the type as the name. Choose how many rows you want (up to 10,000) and the format: JSON, JSON lines, CSV, TSV or SQL INSERT statements with a CREATE TABLE. The types are: id(start,step), uuid, int(min,max), float(min,max,decimals), bool(percentTrue), firstName, lastName, fullName, email, username, phone, city, country, street, zip, company, jobTitle, word, sentence, paragraph(sentences), date(from,to), datetime(from,to), ipv4, url, color, hex(length), oneOf(a,b,c), constant(value), rowNumber. Add ?20 after a field to leave it empty in about 20 percent of the rows, for example nickname: username ?20. Lines that start with # are comments. A seed makes the data repeatable: the same fields, rows and seed always give the same result, which is handy for tests and bug reports; leave the seed empty for new data each time. The data is made up on purpose and cannot belong to a real person: emails end in example.com, example.org or example.net, phone numbers use the reserved 555-01xx range, IP addresses are in the private 10.x.x.x range, and there are no card, passport or tax numbers. We checked the output by loading the SQL into SQLite and reading the CSV with Python, and comparing every value with the JSON for 500 rows with awkward text (quotes, commas, tabs), and by checking that numbers, dates and formats stay in their bounds. For a quick single fake person, use the fake identity generator. Everything is generated in your browser and nothing is uploaded.
How to use it
- List the fields you need, one per line.
- Choose the number of rows, the format and, if you like, a seed.
- Copy the result, or press Generate again for new data.
- For SQL, set the table name; the CREATE TABLE and INSERT statements use it.
Common problems
- It says a line is not valid
- Write name: type or name: type(arguments), for example age: int(18, 65). The message names the line and lists the types.
- I need the same data again
- Type any word as the seed. The same schema, row count and seed give the same data.
- The result is too large
- Output is limited to about 4 MB. Use fewer rows or fields, or shorter types than paragraph.