Skip to main content
Tools

JSON to CSV

Convert JSON to CSV and back, flatten nested objects, detect delimiters, and add a BOM so Excel opens Chinese text correctly.

Arrays
Line ending

0 characters · 1 line

Drop files here, or

.json, .csv, .tsv, .txt (UTF-8 or Big5)

Files are never uploaded.

How to use

  1. Pick a direction: “JSON → CSV” or “CSV → JSON”.
  2. Paste your data, drop a file below, or click “Example”. The result appears instantly, and syntax errors show the line and column.
  3. For CSV output, choose the delimiter, whether to flatten nested objects, and whether arrays become JSON text or separate columns.
  4. For JSON output, choose whether the first row holds column names and whether numbers, true/false and null become JSON types.
  5. Click “Copy” or “Download” to grab the result.

FAQ

Is my data uploaded?

No. The conversion runs in your browser, and dropped files are only read on your device, never uploaded to a server.

Why does Excel show garbled text when I open the CSV?

Without a hint, Excel for Windows reads CSV files in the system’s legacy code page (Big5 on Traditional Chinese systems, for example), so UTF-8 text comes out garbled. With “Add a BOM when downloading” on, the file starts with a UTF-8 marker (BOM) that tells Excel to read it as UTF-8. Google Sheets, Numbers and most programs handle the BOM fine; turn it off for tools that do not. Copied text never includes the BOM.

How do nested objects and arrays become columns?

With “Flatten nested objects” on, {"user": {"name": "A"}} becomes a user.name column. Arrays are written as JSON text by default (such as ["a","b"]), which is easy to read back; you can also split them into columns (tags.0, tags.1). Columns from all rows are merged into one header row, and missing fields are left empty.

Why are numbers not converted by default when reading CSV?

CSV has no types; every field is text. Phone numbers like 0912345678, codes like 007 or long IDs lose their leading zeros or precision once treated as numbers. So everything stays a string by default. With “Convert numbers, true/false and null” on, only values written exactly like JSON numbers become numbers (007 stays a string), and empty cells become null.

Which delimiter should I use? Why does European Excel use semicolons?

When reading CSV, commas, semicolons, tabs and pipes (|) are detected automatically. Excel in some European locales uses the comma as the decimal separator and therefore expects semicolons; choose the semicolon when writing CSV for it. With Tab, the download is a .tsv file.

What about commas, quotes or line breaks inside a field?

The tool follows RFC 4180: fields containing the delimiter, a double quote or a line break are wrapped in double quotes, and double quotes inside a field are doubled (""). When reading CSV, an unclosed quote is reported with its position.

Keyboard shortcuts

/
Search tools (on a tool page, goes to the homepage search)
?
Show this help
Esc
Close a dialog
Ctrl / ⌘Enter
Run the tool's main action (where supported)

While you type in a text field, / and ? are typed as usual.