CSV to JSON and JSON to CSV Converter
Turn spreadsheet exports into JSON and JSON into CSV with a live preview; your data stays in the browser.
or drop it here
Accepts: CSV, TSV, JSON
Converted on this device. Your files are never uploaded.
CSV to JSON: decide on keys and types
With "first row as keys", each row becomes an object such as {"name": "Kim", "age": "34"}; without it you get arrays of values. Comma, semicolon or tab delimiters are detected automatically.
CSV has no data types, so values stay strings unless you turn on “Detect numbers and true/false”. Numbers are decided per column: a column becomes numbers only if every non-empty value is a plain number without a leading zero. Otherwise the whole column stays text, so 01234 and 12345 in one ZIP code column both stay text.
JSON to CSV: nested data becomes text
Give it an array of objects, the shape most APIs return. The header row is the union of keys across all objects, so a key missing from some objects leaves empty cells there.
Nested objects and arrays are written into the cell as JSON text, for example ["a","b"].
Add a BOM if the CSV will be opened in Excel
Excel recognizes a CSV as UTF-8 only when the file starts with a byte order mark (BOM, the bytes EF BB BF). Without it, Korean, accented or other non-English text can show up garbled.
“Excel-friendly (UTF-8 with BOM)” is on by default, so files people double-click open in Excel show correctly. Turn it off for files meant for scripts.
Advertisement
Questions
Why do some CSV files use semicolons?
Excel uses the list separator from the system's regional settings, which in many countries that write decimals with a comma is a semicolon. Auto-detection handles comma, semicolon and tab.
Should I always add the BOM?
No. Some scripts and tools don't expect it and read it as stray characters at the start of the first header. It's on by default for Excel; turn it off for files meant for code.
Is there a size limit?
Only your device's memory. Very large files can make the preview slow, but the data never leaves your browser.
Advertisement