Skip to content

JSON to CSV converter, free, in your browser

To convert JSON to CSV, take an array of objects, collect every key that appears in any of them as the header row, and write one line per object with its values in that column order. Nested objects are flattened into dotted column names such as user.name, arrays are kept as JSON text inside one cell, and any value containing a comma, quote or line break is wrapped in double quotes as RFC 4180 requires. The result opens directly in Excel, Google Sheets or a database import.

C7JSON → CSV — 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 JSON, or drop a .json file.
  2. Choose the delimiter and whether nested keys are flattened.
  3. Copy the CSV or download it as a file.

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

What shape does the JSON need to be?

An array of objects works best: each object becomes a row. A single object becomes one row, an object that wraps an array (such as {"data":[…]}) uses that array, and an array of arrays is written row by row as it is.

What if the objects have different keys?

The header is every key that appears, in order of first appearance. A row that lacks a key gets an empty cell in that column.

How do I open the CSV in Excel without garbled characters?

Download the file and use Data → From Text/CSV in Excel, choosing UTF-8. Double-clicking a CSV lets older versions of Excel guess the encoding, which breaks accented letters.

Can I use semicolons or tabs?

Yes. Pick comma, semicolon, tab or pipe. Semicolons are what Excel expects in countries that write decimals with a comma.

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