📊 CSV files
Test CSV files containing Japanese data
102,400 bytes
text/csv
10,240 bytes
text/csv
10,485,760 bytes
text/csv
1,048,576 bytes
text/csv
5,242,880 bytes
text/csv
About CSV files
CSV test files from 10 KB to 10 MB are available free. They contain synthetic Japanese names, addresses and phone numbers, so import processing can be verified against data shaped like real business records.
CSV has no magic bytes of its own, so its format cannot be confirmed from the content. Validation therefore centres on encoding, delimiters, and quoting. Encoding-specific files live on the encoding test page.
Typical uses
- Exercising a CSV import feature at high row counts
- Measuring bulk-insert performance into a database
- Confirming rows are streamed rather than all held in memory
- Checking whether the file opens in Excel
For the causes of and fixes for mojibake, see Solving CSV mojibake for good, and for working with Excel see How to open CSV correctly in Excel.
Related reference and articles
📖 Where people get stuck
CSV files from 10 KB to 100 MB for exercising an importer. These are well-formed, so getting them through does not mean real data will work. CSV in the wild happily contains embedded newlines, uneven column counts and locale-dependent delimiters.
| Case | What happens | What to do |
|---|---|---|
| Excel opens it garbled | Excel reads a UTF-8 CSV with no BOM as the OS locale — CP932 on Japanese Windows. The file is correct; only the reading is wrong. | Emit UTF-8 with BOM (EF BB BF) for Excel. The encoding test files let you confirm the with-and-without behaviour first. |
| The row count does not add up | A quoted field may contain a newline, so reading line by line splits one record across several. Any implementation using explode("
") breaks on this. |
Do not split by hand; use a stateful parser — fgetcsv() in PHP, csv.reader in Python. To just tidy a file, the CSV cleaner shows you what it finds. |
| Leading zeros vanish and codes become dates | CSV has no types. Excel reads 0123 as a number and 1-2 as a date. The file is correct; the viewer is converting. |
Declare a type per column on import. If Excel is in the loop, designing postcode and product-code columns as text from the start is the safer route. |
The delimiter is not fixed either. In locales where the comma is the decimal separator, Excel writes CSV with semicolons. If you must accept both, counting candidate delimiters in the header row is the practical way to guess.