All tools
Developer

CSV ↔ JSON Converter

Convert CSV to JSON or JSON to CSV, handling quoted fields and commas correctly.

🔒 Runs entirely in your browser — nothing here is ever uploaded

About the CSV ↔ JSON Converter

Converts CSV to JSON or JSON to CSV in either direction, using a full RFC 4180-compliant CSV parser — handling quoted fields, embedded commas, escaped quotes, and embedded newlines correctly, unlike a naive comma-split.

100% Free Runs in Your Browser No Sign-Up Required
How to use it
  1. Choose a direction — CSV → JSON or JSON → CSV.
  2. Paste your CSV (first row = column headers) or JSON (an array of objects) into the input box.
  3. Read the converted result in the output box, and copy it with one click.
Formula
CSV → JSON: parses CSV character-by-character with a quote-aware state machine (per RFC 4180), builds each row into an object keyed by the header row's column names. JSON → CSV: takes the keys of the first object as column headers, then writes one CSV row per array element, quoting any field that contains a comma, quote, or newline (doubling embedded quotes, the standard CSV escaping rule).
Worked example

A CSV row like `"Smith, John","New York","Says ""hi"""` (a comma inside a quoted name and an escaped quote inside a quoted note) parses correctly into `{name: 'Smith, John', city: 'New York', note: 'Says "hi"'}` — a naive comma-split would incorrectly break this into extra fields.

Interpreting your result

Conversion happens entirely client-side — nothing is uploaded or sent to a server. JSON input must be an array of plain objects (one row per object) with matching keys; the JSON → CSV direction uses only the first object's keys as the header row, so all objects should share the same shape. Nested objects/arrays within a field are JSON-stringified into that CSV cell rather than flattened into multiple columns.

Recommendations
  • Switching direction carries your current output over as the new input when it converted cleanly, so you can round-trip data back and forth without losing your place.
  • If a field's value contains a comma, quote, or line break, the CSV output automatically wraps it in quotes and escapes any internal quotes — no need to do this manually.
  • For JSON → CSV, make sure every object in your array has the same keys — the header row is taken from the first object only, so a differently-shaped object later in the array will have mismatched columns.
Frequently asked questions
Yes — it uses a full character-by-character CSV parser that understands quoted fields, so a comma inside quotes (like a "Last, First" name) isn't mistaken for a column separator.