Toolverse

CSV to JSON Converter

Convert CSV to JSON and JSON back to CSV. Paste your data, pick a direction, and copy the result. Everything runs in your browser.

How to use it

Pick a direction — CSV to JSON or JSON to CSV — and paste your data into the box on the left. The converted result appears on the right and updates as you type, so there is no button to press, and you copy the output when it looks right. Everything runs in your browser, so your data is never uploaded. When converting CSV to JSON with the header option turned on, the first row is treated as column names and every following row becomes one record whose fields are keyed by those names; the whole result is an array of those records. Turn the header option off and each row is kept as a plain list of values instead, which is useful when your file has no header line. Either way, empty cells and extra spacing are preserved as written. Going the other way, from JSON to CSV, supply an array of records. The column headers are the union of every field name that appears across the records, so a record that leaves out one field simply gets an empty cell in that column, and the rows are written out in order beneath a single header line. This makes it easy to flatten data that came back from an API into a spreadsheet. Quoting is handled for you in both directions following the common CSV convention. A field that contains a comma, a line break, or a double quote is wrapped in double quotes on output, and a double quote inside a field is written as two double quotes so it is not mistaken for the end of the field. On the way back in, the parser reads those same rules, so values with commas or newlines survive the round trip intact. Converting between the two formats is a routine step when moving a spreadsheet export into a program that expects JSON, turning API responses into something you can open in a spreadsheet, or just inspecting tabular data in whichever shape is easier to read.

Frequently asked questions

Does it handle commas and quotes inside fields?
Yes. Fields wrapped in double quotes can contain commas and line breaks, and a doubled quote ("") is read as a literal quote, following the common CSV convention.
What JSON shape does it expect?
For JSON to CSV, provide an array of objects. The column headers are the union of all keys across the objects; missing values become empty cells.
Is my data sent anywhere?
No. The conversion runs entirely in your browser; nothing is uploaded.
Can I convert a CSV that has no header row?
Yes. Turn off the header option and the first row is treated as data rather than column names, so each row is converted into a plain list of values instead of a keyed record. Turn it back on when the top row really is a header.