CSV ↔ JSON Converter
Convert CSV to JSON, or JSON back to CSV. Correctly handles quoted fields with embedded delimiters and newlines. Nothing is sent to a server — everything runs in your browser, and CSV files over 2MB automatically switch to streaming mode so the tab never freezes.
How to use
- Choose a mode: "CSV → JSON" or "JSON → CSV".
- Options: Choose a delimiter (comma/tab/semicolon), and turn on "Use first row as header" if your CSV's first row is a header (on by default).
- Input: Paste CSV or JSON text on the left, or use "Open file" to open/drag a
.csv/.jsonfile. - Check the result: The converted result appears on the right. Copy it or download it as a file.
Everything runs inside your browser (JavaScript) — nothing you enter is sent to a server or stored. All CSV values are treated as strings (e.g. so a value like "001" doesn't get silently turned into the number 1).
Large-file mode
Opening or dropping a CSV file larger than 2MB automatically switches to streaming mode. Instead of loading the whole file into memory as one string, it reads the file incrementally with File.stream() and converts each row to JSON as it arrives — so opening a CSV with hundreds of thousands of rows won't freeze or crash the tab. In this mode, the input box only shows a preview of the file's beginning, and once conversion finishes, the output box shows just the first 50 rows — use the "Download" button to get the full result (copying is disabled since the result is too large to be useful on the clipboard). Curious how this streaming parser was built, and the real bug fuzz-testing caught along the way? See the large-CSV streaming guide.
Conversion rules
CSV → JSON: With a header row, each row becomes an object {"column": "value", ...}; without one, each row becomes an array of strings. Delimiters, newlines, and escaped double quotes ("") inside quoted fields are handled correctly.
JSON → CSV: If the top-level value is an array of objects, the header row is the union of keys across all objects. An array of arrays is used as-is for rows. Values containing the delimiter, a newline, or a double quote are automatically quoted.
Frequently Asked Questions
Is my data sent anywhere?
No. All conversion happens in JavaScript inside your browser and is never sent to a server.
Numbers and true/false come out as strings.
This is intentional. CSV → JSON keeps every value as a string so things like a ZIP code "001" don't lose its leading zero. If you need actual numbers/booleans, post-process the result (e.g. with the JSON formatter tool).
What JSON structures does JSON → CSV support?
The top-level value must be an array — either an array of objects ([{"a":1}, ...]) or an array of arrays ([["a","b"], ...]). Nested object/array values are placed into the cell as a raw JSON string.
Does it open CSV files exported from Excel?
Usually, yes. If the delimiter isn't a comma (Excel in some locales uses a semicolon), switch the delimiter to semicolon above.
Excel shows garbled non-Latin characters when I open the CSV.
The CSV this tool produces is UTF-8. Excel (especially on Windows) often opens CSV files using the system locale's encoding by default, which can garble non-ASCII text. In Excel, use "Data → From Text/CSV" and explicitly choose UTF-8, or add a UTF-8 BOM to the front of the file (e.g. in Notepad) — either usually fixes it.
What happens with thousands separators in numbers, like "1,000"?
Since the comma collides with the delimiter, such values must be quoted in CSV (e.g. "1,000"). This tool correctly handles commas inside quoted fields, but if the source CSV has unquoted commas mixed into values, columns can be split incorrectly.
Can it handle a CSV that's hundreds of MB?
Yes. CSV files over 2MB automatically switch to streaming mode, which reads and converts the file incrementally instead of loading it all into memory. The JSON → CSV direction doesn't stream yet, and CSV text pasted directly (not opened as a file) is always processed in normal mode.