CSV ⇄ JSON Converter

Paste CSV to get JSON, or an array of objects to get CSV. Delimiters are auto-detected and quoted fields are handled per RFC 4180. Everything runs in your browser.

Direction

Why CSV parsing is trickier than a split(",")

A field can contain the delimiter, a line break, or a quote — as long as the whole field is wrapped in double-quotes, with any internal quote written twice. So Ada,"Mathematician, writer",1843 is three fields, not four. This tool implements theRFC 4180 state machine: it walks the text character by character, tracking whether it's inside quotes, and only treats a delimiter or newline as structural when it isn't. CRLF and LF endings both work, and one trailing newline is ignored so you don't get a phantom empty row.

Delimiter auto-detect

European exports often use ; (because the comma is a decimal separator), data pipelines use tabs, and some logs use |. Auto-detect reads the first line, skips anything in quotes, and counts each candidate — the most frequent wins. Override it with the dropdown if your header line is unusual.

Two JSON shapes

  • Header on → array of objects:[{"id":"1","name":"Ada"}]. Best for feeding an API or a template.
  • Header off → array of arrays:[["1","Ada"]]. Best when position matters more than names, or the file has no header.

Going back to CSV

JSON → CSV takes an array of objects and writes a header from the union of every object's keys, in the order they first appear, so a sparse object just leaves blank cells. Values that contain the delimiter, a quote or a newline are quoted automatically. Remember CSV has no types — the round trip CSV → JSON → CSV is lossless for text but won't turn "42" into a number.

Related: the JSON formatter to validate and pretty-print before converting, andBase64 if you need to embed the file somewhere text-only.

Related tools

Frequently asked questions

Which CSV rules does the parser follow?
RFC 4180: fields separated by the delimiter, records by CRLF or LF, optional double-quotes around a field, and a doubled "" for a literal quote inside a quoted field. Quoted fields may contain the delimiter and line breaks. A single trailing newline is ignored.
How does delimiter auto-detect work?
It looks at the first line — ignoring anything inside quotes — and counts commas, semicolons, tabs and pipes, then picks the most frequent. You can always override it with the delimiter dropdown.
What's the difference between the two JSON shapes?
With 'first row is header' on, each remaining row becomes an object keyed by the header names (array of objects). With it off, every row becomes an array of strings (array of arrays).
What does JSON → CSV expect?
An array of objects. The header row is the union of all keys in first-seen order, so objects that are missing a key get an empty cell. An array of arrays also works and is written row for row.
Are numbers and booleans preserved?
CSV has no types — every value is text. CSV → JSON gives you strings; cast them yourself if you need numbers. JSON → CSV stringifies numbers and booleans, and JSON-encodes any nested object or array in a cell.
When does a value get quoted in the output?
Whenever it contains the delimiter, a double-quote, or a newline. Quotes inside are doubled. Everything else is written bare.
Is my data uploaded?
No. Parsing and serialising happen in your browser with no network calls, so it's safe for exports containing personal or commercial data.
Why does my JSON fail to convert?
It must be valid JSON and a top-level array. Paste it into the JSON formatter first if you're unsure — it'll point at the syntax error.

Last reviewed: September 2026. Figures and formulas are checked against their published sources; see the site's data notes.