N

Runs in your browser · nothing is uploaded

JSON to CSV Converter

Convert JSON to CSV: turn a JSON file or API response into a clean CSV — nested fields flattened into columns, arrays handled the way you choose, and nothing uploaded.

Paste, drop a file here or open one. It's read in your browser and never uploaded.

CSV

Paste JSON or open a .json file — or try the example — to see the table here.

How the conversion works

  1. Each item in the chosen array becomes one row. A single object becomes one row.
  2. Nested keys are joined with the separator: customer.email.
  3. Columns are the union of every record's keys, in first-seen order.
  4. Cells containing the delimiter, quotes or line breaks are quoted, with quotes doubled — standard CSV (RFC 4180).

Example

[{"id": 1, "user": {"name": "Ana"}, "tags": ["a","b"]},
 {"id": 2, "user": {"name": "Ben, Jr."}}]

becomes

id,user.name,tags
1,Ana,"[""a"",""b""]"
2,"Ben, Jr.",

Frequently asked questions

How do I convert JSON to CSV?+

Paste your JSON or open a .json file. Pick which list becomes the rows — the converter finds arrays of records anywhere in the file — choose how nested values and arrays are written, then download the CSV.

How are nested objects handled?+

With flattening on, nested keys become columns joined by a separator: {"customer": {"name": "Ana"}} becomes a customer.name column. Columns appear in the order they're first seen, so the same input always gives the same layout. Records missing a field get an empty cell.

What happens to arrays?+

Choose one of three: keep the array as JSON text in one cell, join simple values with “; ”, or give each item its own column (tags.0, tags.1 …). Arrays of objects can't be joined, so they stay as JSON text unless you choose separate columns.

What is “spreadsheet-safe” export?+

A cell that starts with =, +, −, @ or a tab can run as a formula when the CSV is opened in Excel or Google Sheets — a known risk called CSV or formula injection. Safe export puts an apostrophe in front of those cells in the download only. Plain numbers like −42 are left alone, and the preview always shows your original data.

Is my JSON uploaded?+

No. The file is read and converted in your browser. Nothing is sent to a server or stored.

Why does my file say “Not valid JSON”?+

The message gives the line and column where reading stopped. Common causes are a trailing comma, single quotes instead of double quotes, comments, or a missing closing bracket.

Can I choose which columns to export and change their order?+

Yes. Under “Columns — choose and reorder”, untick any column to leave it out and use the up and down arrows to move it. The preview and the download follow the order you set.

How are null, true and false written?+

true and false are written as the words true and false. For null you choose: an empty cell (the default) or the text null. A missing field is always an empty cell.

Does it work with JSON Lines (NDJSON)?+

Not directly. JSON Lines puts one object on each line with no surrounding brackets, which isn't a single JSON document. Wrap the lines in [ and ] and put a comma after each object except the last, and it converts as an array of records.

Why did a very long number, like an ID, change in the CSV?+

JSON numbers are read as standard double-precision numbers, which are exact only up to 9,007,199,254,740,991. Longer integers get rounded. If an ID is stored as a string in quotes it's copied exactly, leading zeros included.

How do I open the CSV in Excel without broken accents or columns?+

Keep “UTF-8 with BOM” ticked so Excel reads accented letters and other non-English characters correctly. If your Excel uses a comma as the decimal separator and puts everything in one column, choose the semicolon delimiter before downloading.

How large a JSON file can it convert?+

You can open files up to 20 MB. Everything runs in your browser's memory, so very large files are slower on older devices. The preview shows the first 100 rows, but the download includes every row.