How to use CSV to JSON
- 1Paste CSV into the box, or open or drop a .csv, .tsv or .txt file.
- 2Choose the output shape: an array of objects (keys from the header row) or an array of arrays.
- 3Set the options: header row, number and true/false detection, empty cells as "" or null, nested keys and empty rows.
- 4Pick pretty (2 or 4 spaces) or minified output.
- 5Click Copy or Download to save the .json file.
Options that match how the JSON will be used
- First row is the header: header names become the keys. Empty names become column_1, column_2, and duplicates get _2, _3 so no value is lost.
- Detect numbers and true/false: 42 and 3.14 become numbers, true and false become booleans and null becomes null. Values with a leading zero (ZIP codes, phone numbers) and numbers over 15 digits stay strings, because converting them would change the data.
- Empty cells can become empty strings or null, whichever your code expects.
- Nest "a.b" headers: a column called address.city becomes {"address": {"city": ...}}, which reverses what JSON to CSV does.
- Array of arrays keeps the table as rows of values, useful for charts and compact payloads.
Any CSV, any encoding
The delimiter is detected automatically (comma, semicolon, tab or pipe), and quoted fields with commas or line breaks inside them are parsed correctly. Files are decoded with automatic encoding detection, including UTF-8 with or without BOM, UTF-16, Korean CP949 from Excel and Japanese Shift_JIS, and you can override it. Big files are converted in a background thread, so the page keeps responding while a file with hundreds of thousands of rows is processed. The text box shows the beginning of very large results, while Copy and Download always include everything.
For a spreadsheet instead of JSON, use CSV to Excel. To validate or reformat existing JSON, use the JSON Formatter.
Frequently asked questions
Why are some numbers kept as strings?
Values like 04524 or 010-1234-5678 would lose their meaning as numbers, and numbers longer than 15 digits cannot be stored exactly in JSON parsers. Keeping them as strings preserves the data.
Can I convert a CSV without a header row?
Yes. Turn off First row is the header. Keys become column_1, column_2 and so on, or choose Array of arrays to get plain rows.
Does it handle commas and line breaks inside values?
Yes. Quoted fields are parsed according to the CSV standard, including doubled quotes ("") inside a value.
Is my data sent to a server?
No. Parsing and conversion happen in your browser, and the CSV never leaves your device.
Can I get minified JSON?
Yes. Choose Minified for a single line with no extra spaces, or pretty output with 2 or 4 spaces of indentation.