CSV to JSON
Convert CSV to JSON format
Uploaded files: up to 500,000 rows (including the header row, files up to 150 MB). Pasted text: up to 70,000 rows. The conversion runs in your browser; the Cancel button stops it.
Click or drop a .csv file hereChoose a .csv file
About CSV to JSON
CSV to JSON reads a .csv file or pasted CSV and writes JSON in one of three shapes: an array of objects whose keys come from the header row, an array of arrays with the header row first, or JSON Lines with one object per line. The separator and a file's encoding are detected. Columns made only of numbers become JSON numbers, while values with a leading zero stay strings. The result of a file is offered as a download; the result of pasted text appears in the output box. Excel workbooks are not read here.
Example
A pasted CSV and the JSON the tool returns (numbers typed; the leading zero of the postal code is kept):
CSV
id,name,zip 1,Ann,02134 2,"Smith, John",75001
JSON
[
{
"id": 1,
"name": "Ann",
"zip": "02134"
},
{
"id": 2,
"name": "Smith, John",
"zip": "75001"
}
]How to convert CSV to JSON
- 1Choose a .csv file in the upload area, or paste CSV into "Or paste CSV here".
- 2Check "Delimiter:" and, for a file, "Encoding:".
- 3Pick a shape under "Output" and keep or uncheck "Numbers as numbers".
- 4Click "Convert".
- 5For a file, click "Download" to save converted.json, or converted.jsonl for JSON Lines; for pasted text, use "Copy".
Formats and limits
- Input
- .csv file up to 150 MB, or pasted CSV
- Output
- JSON array of objects, JSON array of arrays, or JSON Lines (.jsonl)
- Rows from a file on a computer
- 500,000, header row included
- Rows from a file on phones and tablets
- 70,000, header row included
- Rows of pasted text
- 70,000 on every device
Where your file is processed
Parsing and building the JSON happen in your browser. Your CSV file and the text you paste are not uploaded. A failure, whether shown on the page or not, sends us a short report holding the cleaned error text, this tool's name, and your browser and its version, never your data itself.
Frequently asked questions
Are columns with the same header kept?
Yes. With "Array of objects" or JSON Lines, a second column named name becomes name_2, an empty header becomes column_ followed by its position, and values beyond the last header also get a column_ key. The status line lists each rename. "Array of arrays" keeps the header row exactly as written.
Do numeric columns become JSON numbers?
Yes, when every value in a column is a number; in a semicolon file a decimal comma is read too, so 12,5 becomes 12.5. Values with a leading zero, such as 02134, and numbers with more than 15 significant digits stay strings. Uncheck "Numbers as numbers" to keep all values as strings.
Can I get JSON Lines instead of one array?
Yes. Choose "JSON Lines (one object per line)" under "Output": each row becomes one compact JSON object on its own line, the format many log and data tools read. A file converted this way downloads as converted.jsonl.
How large a CSV can I convert?
500,000 rows from a file on a computer and 70,000 on phones and tablets, header row included, for files up to 150 MB. Pasted text stops at 70,000 rows on every device, because it is held in the page itself, so upload the file instead for more rows.
Tips and tricks
- ✓To turn the JSON back into CSV, use JSON to CSV, which also flattens nested objects into dotted columns.
Related tools
- JSON to CSV — the other way: a JSON array of objects back to CSV.
- CSV to Excel — an .xlsx or .xls workbook from the same CSV.
- CSV to SQL — CREATE TABLE and INSERT statements.
- JSON Formatter — indent, validate, and minify JSON.
- Excel to JSON
- CSV to TSV