CSV to JSON Converter Online
Paste CSV or drop a file into this CSV to JSON converter online and get JSON with exact numbers, true/false values and nested keys, without uploading anything.
Numbers that keep every digit
A column becomes numbers or true/false only when every value fits, so ZIP codes like 02134 and long order IDs stay text, and 19.90 keeps its trailing zero instead of turning into 19.9.
Five JSON shapes
Write an array of objects or arrays, an object keyed by any column, one array per column or JSON Lines, indented with 2 or 4 spaces or tabs, or minified.
Choose, rename and nest columns
Leave columns out, rename keys, set a type for each column and nest headers such as address.city or tags[0], with a preview of the first 50 parsed rows.
How to convert CSV to JSON online
- 1
Paste CSV text, choose a .csv, .tsv or .txt file, or drop the file on the CSV box. The delimiter and encoding are detected for you.
- 2
Choose the output shape: an array of objects, an array of arrays, a keyed object, columns or JSON Lines.
- 3
Check the preview and the Columns list, leave out, rename or retype any column, and set how empty cells and dotted keys are written.
- 4
Copy the JSON, or download it as a .json or .jsonl file.
What people use this tool for
- Turn a spreadsheet export into an array of objects for an API mock, a test fixture or a database seed file.
- Build a lookup object keyed by SKU, ID or country code from a product or reference list.
- Convert a translation sheet with key and text columns into a JSON language file.
- Write a large CSV export as JSON Lines for BigQuery, jq or a log pipeline.
Frequently Asked Questions
How do I convert CSV to JSON online?
Paste the CSV into the CSV input box, choose a .csv, .tsv or .txt file, or drop the file on the box. The JSON appears as you type. With the default settings each row becomes an object whose keys come from the header row, so id,name followed by 1,Ada becomes [{"id": 1, "name": "Ada"}]. Copy the result, or download it as a .json file, or as .jsonl for JSON Lines.
Does the CSV to JSON converter keep numbers and true/false values?
Yes. A column becomes JSON numbers only when every filled value is a plain decimal number with no leading zeros and at most 15 significant digits, and true/false only when every value is true or false in any case, such as TRUE. So 1250.50 stays 1250.50, while a ZIP code like 02134, an ID like 12345678901234567890 or 1e5 keeps its column as text, and the Columns list says why. Set a column to Number, True/false or Text to override this; Number then reads 007 as 7.
How are empty cells and uneven rows handled?
By default an empty cell becomes "" in a text column and null in a number or true/false column; you can choose "", null or leaving the key out instead. Rows with no values at all are skipped and counted. Rows with more or fewer values than the header are listed by row number, with the line number when the two differ, and you choose whether to keep them (missing values empty, extra values under new keys such as column6), drop the extra values or leave those rows out.
Can I convert CSV to nested JSON?
Yes. Turn on nesting and a header such as address.city becomes {"address": {"city": …}}. Bracketed positions such as tags[0] and tags[1] become arrays, and so do numbered parts such as tags.0 and tags.1 when at least two count up from 0 without gaps; other numbers, such as sales.2024, stay object keys. If one column is called address and another address.city, the second stays a flat key and the page says so. Renaming a column to a dotted key nests it too.
How do I turn a CSV into a JSON object keyed by ID?
Choose Keyed object and pick the key column. Each row becomes the value of its key, without the key column unless you keep it, or a single column can be the value, which turns key,value rows into a lookup such as {"hello": "Bonjour"}. If a key repeats, the converter stops and lists the rows by default; you can instead group those rows into arrays, or keep the first or the last row for each key.
What is JSON Lines, and when should I use it?
JSON Lines, also called NDJSON, puts one minified JSON object on each line instead of wrapping every row in one array. Tools that read large files line by line, such as BigQuery, jq and many log pipelines, accept it, and a file can be split or appended to without parsing the whole document. Choose JSON Lines to download a .jsonl file.
Which delimiters, encodings and file sizes are supported?
Comma, semicolon, tab and pipe delimiters are detected automatically or can be chosen by hand. Quoted values may contain delimiters, doubled quotes and line breaks, as RFC 4180 describes. Files can be UTF-8 with or without a byte order mark, UTF-16 or Windows-1252, and Decimal separator: Comma reads 1,5 as 1.5. Files and pasted text can be up to 20 MiB, 2,000,000 rows, 16,384 columns and 5 million cells. The output box shows the first 2 MiB; the download holds all of the JSON, up to 256 MiB, and Copy works up to 64 MiB.
Is my CSV uploaded or stored?
No. The file is read and converted in your browser, in a background worker so the page stays responsive, and nothing is sent to a server. The CSV and the JSON are not saved; only your settings, such as the shape and indentation, are kept in this browser's local storage under zutilium:csv-to-json.