CSV ⇄ JSON Converter

Pick a direction and paste — the conversion runs as you type, in this page.

How it works

CSV → JSON reads the first row as headers and turns every row below it into an object — every value comes back as a string, with no attempt to guess numbers, booleans, or dates from the text. A quoted field can contain a comma, a newline, or an escaped quote (written as "") and is still parsed as one value, per the CSV convention (RFC4180). A data row with the wrong number of fields is reported as an error rather than silently misaligned.

JSON → CSV expects a JSON array of objects. The header row is the union of every key seen across all the objects, in the order it was first encountered — a row missing one of those keys gets an empty field rather than breaking the conversion. Any field containing a comma, a quote, or a newline is wrapped in quotes, with internal quotes doubled.