Skip to content

CSV to JSON and JSON to CSV converter, free, in your browser

To convert CSV to JSON, treat the first row as field names and turn every following row into an object with those keys, producing an array of objects. To convert JSON to CSV, collect the union of keys across the objects as the header row and write one row per object, quoting any value that contains a comma, quote or newline. This tool does both directions locally, handles quoted fields and custom delimiters, and can convert numbers and booleans to their typed values.

C7CSV ↔ JSON — TabbyTools
Ready0 B sent to server

Your files never leave your device. Processing happens in your browser. How that works.

Related formats

How it works

  1. Paste CSV or JSON, or drop a file.
  2. Set the delimiter and whether the first row is a header.
  3. Copy or download the converted result.

Runs as JavaScript inside this tab. Turn off your connection after the page loads and it still works.

CSV format reference

RFC 4180 in five rules

  1. Each record is one line, ending in CRLF (\r\n); LF alone is accepted by everyone.
  2. Fields are separated by a comma (or another single-character delimiter).
  3. A field containing the delimiter, a double quote or a line break must be wrapped in double quotes.
  4. A double quote inside a quoted field is written as two double quotes: "She said ""hi""".
  5. The first line may be a header naming the columns. There is no in-band way to say whether it is; the tool assumes yes unless you untick the option.

Delimiters

Delimiter Where it appears
Comma , Default almost everywhere
Semicolon ; Excel in locales that use a comma as the decimal separator (most of Europe)
Tab TSV exports, clipboard data from spreadsheets
Pipe | Legacy data feeds

Detection counts candidate delimiters on the first non-empty line and picks the most frequent.

Type inference

CSV has no types. With inference on, a cell that looks like a number (42, -3.5, 1e6), a boolean (true/false) or null becomes that JSON value; everything else stays a string. Leading zeros (007), long digit strings (IDs, phone numbers) and dates are kept as strings because converting them loses information. Turn inference off to keep every value as text.

Nested JSON to CSV

Objects inside objects are flattened with dot notation:

{"user": {"name": "Ada", "address": {"city": "London"}}}

becomes columns user.name and user.address.city. Arrays are written as JSON text inside the cell (["a","b"]). Converting that CSV back to JSON produces the flat keys, not the nested structure.

Column union

When objects have different keys, the CSV header is the union of all keys in first-seen order, and missing values are empty cells.

Encoding and Excel

  • Save as UTF-8. If Excel shows é instead of é, the file was opened as Windows-1252; add a UTF-8 BOM or use Data → From Text.
  • Excel truncates leading zeros and converts long numbers to scientific notation on open; import as text where that matters.
  • Excel’s CSV export uses the locale delimiter, which is why semicolons appear.

Worked examples

CSV to JSON

name,age,city,active
Ada,36,London,true
Linus,28,"Helsinki, FI",false
[
  { "name": "Ada", "age": 36, "city": "London", "active": true },
  { "name": "Linus", "age": 28, "city": "Helsinki, FI", "active": false }
]

The quoted city keeps its comma; 36 and true become typed values.

JSON to CSV with nesting

[{"id":1,"user":{"name":"Ada"},"tags":["a","b"]},{"id":2,"user":{"name":"Linus"},"tags":[]}]
id,user.name,tags
1,Ada,"[""a"",""b""]"
2,Linus,[]

Nested user.name is flattened; the array is stored as JSON text with inner quotes doubled.

Semicolon CSV from Excel (Europe)

name;price\nWidget;3,50 is detected as semicolon-delimited. 3,50 stays a string because a comma is not a JSON decimal separator; replace it with 3.50 first if you need a number.

No header row

Untick First row is header and each line becomes an array: [["Ada",36],["Linus",28]].

Frequently asked questions

How are nested JSON objects converted to CSV?

Nested keys are flattened with dot notation, so {"user":{"name":"Ann"}} becomes a column named user.name. Arrays are JSON-encoded inside the cell.

Why are my numbers strings?

CSV has no types; everything is text. Enable “Infer types” to convert numeric strings, true/false and null into JSON values.

Does it support semicolon or tab delimiters?

Yes. Pick comma, semicolon, tab or pipe, or let the tool detect the delimiter from the first line.

How are commas inside values handled?

Per RFC 4180: fields containing commas, quotes or newlines are wrapped in double quotes and inner quotes are doubled.

CSV ↔ JSON · last updated · changelog · part of Canned Tuna