CSV to JSON

Convert CSV into JSON, and back again

CSV → JSON
JSON output
Converted output appears here…

Quoted fields and embedded commas

CSV looks trivial until a value contains the delimiter. The convention, set out in RFC 4180, is to wrap such values in double quotes — Ada,"Engineer, Senior" is two fields, not three. A literal quote inside a quoted field is escaped by doubling it. This converter handles both, along with values that contain line breaks.

Headers become keys

With first row is a header enabled, each remaining row becomes a JSON object keyed by the header names. Turn it off and you get an array of arrays instead, which is what you want for data with no meaningful column names.

Converting back the other way, keys are collected across every object, so records with missing fields still line up in the right columns — the gaps are simply left empty. Nested objects and arrays are serialised as JSON strings inside their cell, since CSV has no way to express them.

Everything is parsed locally in your browser, so the data never reaches a server.

Other text tools