CSV to JSON Converter
Convert CSV or TSV to JSON — objects, keyed, column arrays, JSON Lines or minified. Sort, skip, limit, 10 file encodings. In your browser, no upload.
More options
🔒 Runs in your browser — nothing is uploaded.
CSV rows into a JSON array
This converter turns CSV or TSV text into a clean JSON array right in your browser. Paste a spreadsheet export, a database dump, or an API response and get formatted JSON you can drop straight into code, a config file, or a request body. The parser follows RFC 4180, so quoted fields that contain commas, double quotes, or line breaks are handled correctly rather than splitting your rows apart.
Options you can control
Choose a delimiter — comma, tab (TSV), semicolon (common in European Excel), pipe, colon, space or caret, or type your own — or let auto-detect pick one from the first line. Keep “First row is a header” on to get an array of objects keyed by column name, or turn it off to get an array of arrays. Enable type conversion to turn cells like 42, true, and null into real JSON numbers, booleans, and null, while leaving identifiers such as 007 or zip codes as strings so nothing is corrupted. Everything runs locally, so even large or sensitive files never leave your device.
Four shapes, three ways to write them
The output does not have to be an array of objects. Pick an object keyed by a column and each row becomes the value under its own key, with the key column left out of that value; a key value that turns up twice is quoted back at you and the conversion stops, because keying on it would drop a row. Pick one array per column for {"name": ["Ann","Bob"]}. Turning the header off gives the fourth shape, an array of arrays with the first row included. Each of those can be written indented with two spaces, minified onto one line, or as JSON Lines — one record per line with no commas between them, downloaded as a .jsonl file. JSON Lines only makes sense for a list, so asking for it on a keyed or column-array shape is refused instead of quietly written as something else.
Shape the rows before they become JSON
Under More options, skip lines at the top drops a title row or an export banner sitting above the header, and auto-detect then reads the header line it lands on. Max rows caps the data rows and is applied after sorting, so a sorted limit is a real top-N. Sort rows by orders by any column — numbers as numbers, everything else in code-point order, and stable, so rows that tie keep the order the file had them in. A columns list picks and reorders the fields you want, and a name that is not in the file is reported by name. Leave an empty field out removes that key from the row object entirely instead of writing an empty string, and read NULL as null accepts NULL, Null or null without switching on full type conversion. Rebuild nested objects turns path headers such as address.city back into real nesting; a numeric segment like tags.0 rebuilds an array, the joining character can be ., / or _, and two headers that disagree about a path are reported rather than silently overwriting each other. It is the exact inverse of the flattening the JSON to CSV converter does.
Files a spreadsheet actually exports
Open a .csv, .tsv or .txt of up to 10 MB and say which encoding it was saved in: utf-8, utf-16le, utf-16be, windows-1252, windows-1251, iso-8859-2, euc-kr, shift_jis, gb18030 or big5. Decoding is strict, so a CP949 export read as UTF-8 tells you which setting to change instead of handing back a page of question marks. A leading UTF-8 byte-order mark from Excel is stripped so the first key is exactly the column name, duplicate header names are disambiguated (a, a_2) instead of one column swallowing another, and the apostrophe a spreadsheet writer puts in front of a cell starting with =, +, - or @ is taken back off on the way in. Copy link puts every option in the URL and your data in none of it.
Frequently asked questions
Does my CSV get uploaded anywhere?
No. Parsing happens entirely in your browser with JavaScript. Your data never leaves your device and nothing is uploaded, logged, or stored.
What is the difference between header on and off?
With the header option on, the first row supplies the keys and each following row becomes a JSON object. With it off, every row including the first becomes an array of string cells, which is useful when your data has no header line.
How does type conversion decide what to convert?
It only converts a cell when the value round-trips exactly: 42 becomes a number, true and false become booleans, and null becomes null. Values like 007, +1, or 1.0 stay strings so leading zeros and formatting are preserved.
Can I get an object keyed by an ID column instead of an array?
Yes. Set Output shape to “Object keyed by a column” and choose the column. Each row becomes the value under its own key, and the key column is left out of that value. If two rows carry the same key, the tool quotes the repeated value back and stops, because keying on that column would silently drop one of the rows.
How do I get JSON Lines (NDJSON) or minified output?
The Formatting menu offers indented (two spaces), minified onto one line, and JSON Lines — one JSON record per line with no commas between them, which downloads as a .jsonl file. JSON Lines needs a shape that is a list, so it is refused on the keyed and column-array shapes rather than written as something else.
My export has title rows above the header. Can I skip them?
Yes. “Skip lines at the top” under More options drops that many lines before anything is parsed, and auto-detect then reads the header line it lands on. “Max rows” caps how many data rows are kept and is applied after sorting, so choosing a sort column and setting max rows to 10 gives you a real top ten.
Can it rebuild nested objects from headers like address.city?
Yes — turn on “Rebuild nested objects from path headers”. address.city becomes {"address":{"city":…}}, a numeric segment such as tags.0 rebuilds an array, and the joining character can be a dot, a slash or an underscore. Two headers that disagree about the same path — one holding a value, one holding a field inside it — are reported instead of overwriting each other. It is the exact inverse of the flatten option in the JSON to CSV converter.
My Korean or Japanese CSV comes out as question marks. What do I do?
Open “More options”, set “Encoding of an opened file”, then open the file again. Ten encodings are offered: utf-8, utf-16le, utf-16be, windows-1252, windows-1251, iso-8859-2, euc-kr, shift_jis, gb18030 and big5. Decoding is strict, so a CP949 (EUC-KR) file read as UTF-8 is refused with a message pointing at that setting rather than handed back as replacement characters.