Skip to the tool

CSV to JSON

Paste a CSV, get an array of typed JSON objects, quoted commas handled, delimiter detected, numbers arriving as numbers. The reverse direction is one toggle away.

Guide

How to use it

  1. Paste the CSV (or tap the sample to see the shape). The delimiter, comma, semicolon, tab or pipe, is detected from the first line.
  2. Keep First row is headers ticked to get objects keyed by column name, untick it for plain arrays.
  3. Read the JSON preview: numbers, booleans and nulls arrive typed, everything else stays a string.
  4. Copy or download. Ragged rows (a stray comma somewhere) are flagged rather than silently mangled.

Examples

The cases that break naive converters

"Amara, Okafor"

A comma inside quotes is data, not a delimiter. The parser here is state-machine RFC-style: quoted fields, embedded quotes ("") and multi-line cells all survive.

SEMICOLON CSVs

Continental Excel exports use semicolons (comma being the decimal separator). Auto-detection reads the first line and adapts, no setting to hunt for.

007 STAYS "007"

Type coercion with judgement: 42 becomes a number, true a boolean, but 007 and long ID digits stay strings, leading zeros are data the moment they exist.

Method

How it works

Parsing is a character-walk state machine (in-quotes or not), the approach every serious CSV library uses, because split-on-comma dies at the first quoted address. Headers become object keys with blanks auto-named, and values coerce conservatively: clean numerics, true/false and null convert, ambiguous strings do not.

The reverse direction flattens nested objects with dot notation (user.name becomes a column) and quotes anything containing delimiters, so the round trip is Excel-safe. All of it local, half-megabyte files parse in a blink.

FAQ

Frequently asked questions

How big a CSV can it take?

Up to about half a megabyte pasted, tens of thousands of rows. Beyond that you want a script rather than a page, and honestly, a database.

Why did my ID numbers gain quotes?

Leading zeros or 16+ digits: converting those to JSON numbers would corrupt them (Excel’s favourite crime). The tool keeps them as strings deliberately.

Can it produce nested JSON from dot columns?

The reverse direction flattens nested to dots. Un-flattening dots to nesting on the way in is deliberately not guessed at, ambiguity lives there.

What about the header row when converting back?

JSON to CSV takes the union of keys across all objects as columns, missing values become empty cells, extra keys get their own column.

My file uses tabs, is that CSV?

TSV, and it works: tab is one of the auto-detected delimiters. Pasting from Excel directly usually arrives as tabs.

Is my data uploaded?

No. Customer lists and exports parse entirely in your browser’s memory.

More tools

Related tools

JSON formatterPretty-print and validate the result. JSON to CSVThe dedicated reverse page. Diff checkerCompare two exports. Base64When the CSV arrives encoded.
Skip to the tool

CSV to JSON

Paste a CSV, get an array of typed JSON objects, quoted commas handled, delimiter detected, numbers arriving as numbers. The reverse direction is one toggle away.

Delimiter: comma (auto-detected)
JSON out \u00b7 3 records · 4 columns
[
  {
    "name": "Amara, Okafor",
    "dept": "Engineering",
    "salary": 58200,
    "city": "Leeds"
  },
  {
    "name": "Ben Says “Hi”",
    "dept": "Design",
    "salary": 44100,
    "city": "Bristol"
  },
  {
    "name": "Chloe Fox",
    "dept": "Data",
    "salary": 51750,
    "city": "York"
  }
]

Parsed on your device with a proper quote-aware parser. Spreadsheets full of customer data never leave your machine.

Guide

How to use it

  1. Paste the CSV (or tap the sample to see the shape). The delimiter, comma, semicolon, tab or pipe, is detected from the first line.
  2. Keep First row is headers ticked to get objects keyed by column name, untick it for plain arrays.
  3. Read the JSON preview: numbers, booleans and nulls arrive typed, everything else stays a string.
  4. Copy or download. Ragged rows (a stray comma somewhere) are flagged rather than silently mangled.

Examples

The cases that break naive converters

"Amara, Okafor"

A comma inside quotes is data, not a delimiter. The parser here is state-machine RFC-style: quoted fields, embedded quotes ("") and multi-line cells all survive.

SEMICOLON CSVs

Continental Excel exports use semicolons (comma being the decimal separator). Auto-detection reads the first line and adapts, no setting to hunt for.

007 STAYS "007"

Type coercion with judgement: 42 becomes a number, true a boolean, but 007 and long ID digits stay strings, leading zeros are data the moment they exist.

Method

How it works

Parsing is a character-walk state machine (in-quotes or not), the approach every serious CSV library uses, because split-on-comma dies at the first quoted address. Headers become object keys with blanks auto-named, and values coerce conservatively: clean numerics, true/false and null convert, ambiguous strings do not.

The reverse direction flattens nested objects with dot notation (user.name becomes a column) and quotes anything containing delimiters, so the round trip is Excel-safe. All of it local, half-megabyte files parse in a blink.

FAQ

Frequently asked questions

How big a CSV can it take?

Up to about half a megabyte pasted, tens of thousands of rows. Beyond that you want a script rather than a page, and honestly, a database.

Why did my ID numbers gain quotes?

Leading zeros or 16+ digits: converting those to JSON numbers would corrupt them (Excel’s favourite crime). The tool keeps them as strings deliberately.

Can it produce nested JSON from dot columns?

The reverse direction flattens nested to dots. Un-flattening dots to nesting on the way in is deliberately not guessed at, ambiguity lives there.

What about the header row when converting back?

JSON to CSV takes the union of keys across all objects as columns, missing values become empty cells, extra keys get their own column.

My file uses tabs, is that CSV?

TSV, and it works: tab is one of the auto-detected delimiters. Pasting from Excel directly usually arrives as tabs.

Is my data uploaded?

No. Customer lists and exports parse entirely in your browser’s memory.

More tools

Related tools