CSV to JSON Converter

Convert CSV to JSON or JSON to CSV instantly. Correctly handles quoted fields, commas and newlines inside values, custom delimiters, and header rows.

CSV / JSON converter

Conversion runs locally in your browser. No data is uploaded to the server.

Input

Paste CSV or JSON to convert.

Output

Rows-
Columns-

How CSV to JSON conversion works

Each CSV row becomes a JSON object, and the header row (or generated col1, col2, ... names) becomes the object keys. Values inside double quotes can safely contain commas, quotes (escaped as ""), and even line breaks, and this tool parses them correctly instead of naively splitting on the delimiter.

How JSON to CSV conversion works

The tool expects a JSON array of objects. It collects the union of all keys across every object to build the header row, then writes one CSV row per object. Any value containing the delimiter, a quote, or a line break is automatically wrapped in quotes and escaped per RFC 4180.

Choosing a delimiter

Comma is the most common CSV delimiter, but semicolon is common in regions where comma is a decimal separator, and tab-separated values (TSV) are common for spreadsheet exports. Pick the delimiter that matches your source file or target system.

FAQ

Does this handle commas inside quoted CSV fields?

Yes. The parser tracks quoted sections character by character, so a quoted field containing a comma, like New York followed by a comma and NY, keeps its comma instead of being split into two columns.

Can I convert JSON back to CSV?

Yes. Switch Direction to JSON to CSV and paste a JSON array of objects. The tool builds a header row from all object keys and writes one CSV row per object.

What happens if my JSON objects have different keys?

The tool uses the union of all keys found across every object as the CSV header. Objects missing a given key get an empty value in that column.

Is my data uploaded anywhere?

No. All parsing and conversion happens locally in your browser JavaScript. Nothing is sent to a server.

Can I use a semicolon or tab instead of a comma?

Yes. Choose Semicolon, Tab, or Pipe from the Delimiter dropdown for both CSV to JSON and JSON to CSV directions.

Related tools