CSV ↔ JSON

Convert between CSV and JSON with header detection and delimiter selection.

3 rows · 4 cols · delim ,
[
  {
    "name": "Ada Lovelace",
    "email": "ada@example.com",
    "age": 36,
    "active": true
  },
  {
    "name": "Linus, Torvalds",
    "email": "linus@example.com",
    "age": 54,
    "active": true
  },
  {
    "name": "Grace Hopper",
    "email": "grace@example.com",
    "age": 85,
    "active": false
  }
]

About CSV ↔ JSON

CSV ↔ JSON converts tabular data between CSV (or TSV, or any delimited table) and JSON in either direction. Paste a CSV and get an array of objects keyed by the header row; paste an array of objects and get a CSV with auto-detected headers. The parser handles quoted fields, embedded delimiters, escaped quotes (`""`), and mixed line endings — the corners of CSV that simple split-on-comma tools get wrong.

Reach for it whenever data needs to cross the spreadsheet/code boundary: an export from Excel or Google Sheets you want to feed into a JSON-only API, a JSON response you want to open in a spreadsheet, a SQL query result copied as TSV that you want to manipulate as JSON, or a fixture file you want to maintain as a spreadsheet but consume as code. Delimited String → Lines is the simpler, structure-free cousin (one delimited string to a list of lines); CSV ↔ JSON is the structured tabular version with proper quoting and header support.

Examples

Input
name,born,tags
Ada,1815,"mathematician,programmer"
Grace,1906,"admiral,programmer"
Output
[
  { "name": "Ada", "born": "1815", "tags": "mathematician,programmer" },
  { "name": "Grace", "born": "1906", "tags": "admiral,programmer" }
]

Header row promoted to keys; the quoted `tags` field with an embedded comma is parsed correctly. JSON → CSV reverses the operation.

Frequently asked questions

How is this different from Delimited String → Lines?

Delimited String → Lines is a literal split — it does not understand quoting, header rows, or escapes. CSV ↔ JSON is a real CSV parser: quoted fields with embedded commas, escaped quotes, and a header-driven object shape. Use the simpler tool for ad-hoc strings; use this one for real CSV files.

What if my file is TSV (tab-separated)?

Switch the delimiter from `,` to tab. Any single character — semicolon, pipe, custom — works. The parser uses the same quoting rules regardless of the delimiter.

Are values typed?

By default, every CSV cell is emitted as a string in the JSON output (CSV has no type information). Toggle the *infer types* option to coerce numeric, boolean, and null-looking strings to their JSON types — useful for downstream code that expects numbers.

Does it handle CRLF line endings?

Yes. Both CRLF (Windows) and LF (Unix) are accepted in input, and the output uses LF by default. Toggle the option to emit CRLF if your downstream consumer requires it.