CSV ↔ JSON Converter
Convert CSV to JSON or JSON to CSV with a real quoted-field-aware parser — never a naive comma split that breaks on real-world data.
Parsing and conversion run entirely in your browser — nothing you paste here is sent to a server. The CSV parser correctly handles quoted fields, commas and line breaks inside quotes, and doubled "" as an escaped quote, rather than a naive split on commas.
CSV → JSON treats the first row as column headers and turns every following row into one JSON object. JSON → CSV expects a JSON array of plain objects — e.g. [{"name":"Alice","age":30}] — and builds a header row from every key found across all objects, filling in a blank for any object missing a given key.
Real CSV data routinely contains commas and line breaks inside a quoted field (e.g. a street address like "123 Main St, Apt 4") — this parser correctly handles that instead of naively splitting on every comma, which would otherwise silently shift every following column.
Whitespace inside a field is preserved exactly as typed — a value like " Alice" keeps its leading space rather than being silently trimmed. A row with more values than the header defines, a duplicate column header, or a column header that collides with a reserved JSON property name (__proto__, constructor, or prototype) is rejected with a specific error rather than silently dropping or overwriting data.
How to use the CSV ↔ JSON Converter
- Choose a direction: CSV → JSON or JSON → CSV (switching clears the box).
- Paste your data into the input box.
- Click Convert and check the row count or the error message.
- Click Copy, or Download to save converted.json or converted.csv.
Example: Quoted comma and a short row
In CSV → JSON, convert three lines: name,city,age / Alice,"Portland, OR",30 / Bob,Austin. The tool reports Converted 2 rows and outputs objects where Alice's city is "Portland, OR" and age is "30", and Bob's missing age is an empty string "".
Questions about the CSV ↔ JSON Converter
- Why are my numbers quoted in the JSON?
- CSV has no data types, so every value becomes a JSON string, such as "30". Convert types in your own code if you need numbers or booleans.
- Does it read semicolon or tab separated files?
- No, only commas separate fields. A semicolon file is read as a single column, such as a key named "a;b".
- What happens to nested objects or arrays in JSON → CSV?
- They are written as JSON text inside one quoted cell, for example ["a","b"] becomes "[""a"",""b""]". Missing keys and null values become empty cells.
- What line endings does the CSV output use?
- Rows are separated with CRLF (\r\n) line endings.