πŸ”„

CSV ↔ JSON Converter

Convert between CSV and JSON both ways. Edit as a live table β€” add, delete, rename, reorder columns and rows. 100% in your browser.

Click to upload or drop a .csv / .json file here
Input CSV
0 rows Γ— 0 cols

No data yet

Paste input above, drop a file, or hit Sample β€” the editable grid appears here.
Output JSON

      

About CSV ↔ JSON Converter

This converter turns CSV into a JSON array of objects and JSON back into CSV, with an editable grid between input and output. The CSV parser follows RFC 4180 conventions: a field that opens with a double quote may contain the delimiter, line breaks and doubled quotes ("" becomes "). Carriage returns outside quotes are dropped, so Windows CRLF files parse exactly like LF files, and blank lines are skipped. Comma, tab, semicolon, pipe or a custom delimiter can be selected β€” semicolon is common in spreadsheet exports from locales that use the comma as a decimal separator.

From JSON to CSV, nested objects are flattened into dot-notation columns (address.city, address.zip), and the column list is the union of keys across all records in first-seen order, so sparse records simply get empty cells. Arrays are not exploded into extra rows; they are written into one cell as JSON text. In the other direction, "Un-flatten dotted keys β†’ nested objects" rebuilds the nesting from dotted headers. Parsing, editing and downloads all happen in your browser, and files you drop are read locally, never uploaded.

Common Use Cases

How to Use

  1. Choose a direction with the CSV β†’ JSON or JSON β†’ CSV tab
  2. Paste data into the input panel, click Sample, or drop a file on the upload area β€” a .json file switches to JSON β†’ CSV and a .csv file to CSV β†’ JSON
  3. Set the Delimiter and toggle First row is header, Infer types, Trim whitespace and the flatten option to match your data
  4. Edit the grid: type in a header to rename a column, move it with β—„ and β–Ί, remove it with βœ•, and use + Column / Key, + Row, Duplicate row and Delete row; Enter in the last row adds a new one
  5. Copy the result, or Download it as data.json or data.csv

Frequently Asked Questions

Why did my ZIP codes or IDs lose their leading zeros?

With Infer types on, a value made only of digits becomes a JSON number, so 00501 turns into 501. Switch Infer types off to keep every value as a string. Integers larger than 2^53 βˆ’ 1 are left as strings automatically, so long numeric IDs are never silently rounded. Inference also recognises true, false and null in any letter case and decimals such as 3.14, but not exponent notation like 1e5.

What happens to rows with missing or extra fields?

With a header row, each line is mapped onto the header: missing trailing fields become empty strings and fields beyond the last header are dropped. Without one, the widest row sets the column count and columns are named col_1, col_2 and so on. Duplicate headers get a numeric suffix (id, id_2) so no value is overwritten.

When does the CSV output quote a value?

Only when it has to. A cell is wrapped in the selected quote character if it contains the delimiter, that quote character or a line break, and embedded quotes are doubled. The Quote setting affects output only β€” input is always parsed with the double quote as the quoting character.

Does the JSON input have to be an array?

A top-level object is accepted and treated as a single row. Array items that are plain values rather than objects are placed in a column named value.