CSV Data Generator
Define columns by rule, batch generate structured test data and export a .csv file
Column definitions
Data preview
Showing the first 10 rows only; export generates all rows
Showing the first 10 rows only; export generates all rows
What is the CSV Data Generator?
The CSV Data Generator is an online tool for batch-generating structured test data and exporting it as a standard .csv file. For each column you pick a data type — name, phone, ID, date, money, UUID and more — set the number of rows, and it produces rule-based mock data. You can also choose the delimiter (comma, semicolon, tab or pipe), whether to include a header row, and whether to add a UTF-8 BOM so Excel opens the file without garbled characters. All data is generated locally in your browser and never uploaded to any server, making it ideal for populating databases during development and testing, fleshing out demo interfaces, or supporting teaching and presentations. The tool supports localized fake data in ten languages: once you choose a data language, fields like name, company, city and phone are generated in the real conventions of that language's region — Japanese names for Japanese, Korean company names for Korean, and so on.
How to use
Steps
- Choose a "Data language" at the top to set the style of localized fields like name and company
- Set the number of rows to generate, or pick a quick preset: 100 / 1K / 10K / 50K
- Under "CSV options" pick a delimiter, line ending, and whether to include a header row and a UTF-8 BOM
- Add columns one by one under "Column definitions": enter a name, choose a data type, and fill in options as needed (such as a number range or date span)
- Click "Generate preview" to check the first 10 rows, then click "Export .csv" to download the file, or "Copy CSV" to copy the text directly
Tips
- Use the Enum type with comma-separated options for fixed values like gender, status or tier
- The Regex type generates strings from a custom pattern, covering cases the built-in types do not
- Pick semicolon or tab as the delimiter when your data contains commas, to avoid breaking fields
- Enable the UTF-8 BOM if you will open the CSV in Excel on Windows, so Chinese and other non-ASCII text shows correctly
- Use "Copy CSV" to paste generated data straight into a spreadsheet or editor without saving a file
Use cases
Technical principle
The core of the tool is a set of column-type dispatchers. Each column is bound to a type; during generation the tool walks every row and calls the matching generator function, producing a two-dimensional array. Types fall into two groups. The first is localized fake data, powered by the multi-language locale modules of @faker-js/faker: based on the chosen data language it calls the region-specific name, company, city and phone generators, so Japanese yields Japanese names and Korean yields Korean addresses. The second is formatted data — numbers, dates, money, UUID, IP, ID cards and the like — produced by pure functions, with the Chinese ID card following the GB 11643 standard to compute the 18-digit checksum. Unlike a spreadsheet format, CSV has no cell types: every value is plain text. So each generated value is serialized into a readable string — dates as ISO strings (yyyy-mm-dd), money with its currency symbol, booleans as true/false — and the file is then assembled following RFC 4180: any field that contains the delimiter, a double quote or a newline is wrapped in double quotes, and inner double quotes are escaped by doubling. You can switch the delimiter between comma, semicolon, tab and pipe, choose CRLF or LF line endings, and optionally prepend a UTF-8 BOM so Excel detects the encoding correctly. The faker locale module for the selected language is loaded dynamically, importing only the one currently needed instead of bundling all ten languages into the page. All generation and export happen locally in the browser with nothing uploaded. The random source is the browser's built-in pseudo-random generator: results within a single run do not repeat but are not reproducible; for reproducible data you can fix a seed (supported in a future version). The 50,000-row cap balances memory usage against export time and covers the vast majority of testing and demo needs.
- Dispatch by column type: localized data via faker locale, formatted data via self-implemented pure functions
- faker locale is loaded dynamically, importing only the current language to control bundle size
- CSV follows RFC 4180: fields with delimiters, quotes or newlines are quoted and inner quotes are doubled
- Optional UTF-8 BOM lets Excel open the file without garbled non-ASCII text
- Everything runs locally in the browser — no data leaves your device, protecting privacy
Examples
Users table sample
Columns:
ID -> Auto index (start 1, step 1)
Name -> Full name
Email -> Email
Phone -> Phone
Signup time -> Date & time
Delimiter: comma, header: yes, BOM: yes
Rows: 1000
Output: users.csv (1000 rows)Order amounts sample (semicolon delimiter)
Columns:
Order ID -> UUID
Amount -> Money (min 10, max 9999, 2 decimals)
Discount -> Percent (min 0, max 50)
Status -> Enum (pending, paid, shipped, done)
Delimiter: semicolon (amounts contain no comma, but a semicolon avoids locale pitfalls)
Output: orders.csv — open in Excel or import into a database directly.FAQ
Is the generated data uploaded to a server?
No. All data is generated and assembled locally in your browser. The tool never sends your column definitions, results or the exported CSV file to any server, which makes it suitable for confidential table schemas and field layouts.
What is the maximum number of rows?
Up to 50,000 rows per run. This balances browser memory against CSV build time and covers most testing, demo and database-import scenarios. For larger volumes, generate in batches or use a database script instead.
Why do name and company fields need a "Data language"?
Fields like name, company, city and phone are strongly region-specific. Choosing a data language makes the tool generate them in the real conventions of that region — Japanese names for Japanese, Korean company names for Korean — so your CSV test data feels closer to real business.
Why are numbers and dates plain text in the CSV?
CSV is a pure-text format with no cell types, so every value is stored as a string. Numbers, money, dates and the like are serialized into readable text. If you need native cell types that Excel can calculate, use the Excel Data Generator instead.
When should I turn on the UTF-8 BOM?
Turn it on if you will open the CSV in Excel on Windows, especially when the data contains Chinese or other non-ASCII characters — the BOM tells Excel to read the file as UTF-8 and avoids garbled text. Most databases and programming tools handle UTF-8 fine without a BOM, so you can leave it off for those.
Which delimiter should I choose?
Comma is the default and the most widely compatible. If your data itself contains commas (for example free-form addresses), switch to semicolon, tab or pipe to avoid splitting fields. Some European locales use a comma as the decimal separator, in which case a semicolon delimiter is the convention.
How do I generate a format the built-in types don't cover?
Use the Regex type to generate strings from a custom pattern. For example, [A-Z]{3}\d{4} produces a code of three uppercase letters followed by four digits, flexibly covering cases the built-in types don't.