JSON to CSV converter

Turn JSON into a CSV for Excel or Google Sheets, or a CSV into JSON. Nested fields become columns, broken rows are marked, and values Excel would mangle are flagged before you open the file.

JSON
Waiting for input

From JSON to rows and columns

[
  { "id": 1, "name": "Ada",   "address": { "city": "London" }, "tags": ["admin"] },
  { "id": 2, "name": "Grace", "address": { "city": "New York" } }
]

becomes

id,name,address.city,tags
1,Ada,London,admin
2,Grace,New York,

Columns are the union of every key across all rows, in the order they first appear. A row that’s missing a key gets an empty cell, and the converter tells you how many rows are missing each column, which often reveals inconsistent API data.

Problems in a CSV, marked where they are

CSV looks simple, but there’s no strict standard and every tool writes it slightly differently. Converting CSV to JSON, the converter checks for:

  • Unclosed quotes, which swallow the rest of the file into one cell.
  • Text after a closing quote, usually a quote inside a field that should have been doubled ("").
  • Rows with the wrong number of fields, with the row number and the count.
  • Missing, padded or duplicate headings; duplicates are renamed so no data is lost.
  • A first row of numbers, which is probably data, not headings.
  • Leading zeros in values that would otherwise become numbers.

Click a row in the table view to jump to it in your CSV.

Getting it into Excel cleanly

  • Use Download rather than copy and paste. The file includes a UTF-8 byte order mark so Excel shows £, é and emoji correctly.
  • In some European locales Excel expects semicolons. Pick the delimiter that matches your setup.
  • Turn on CRLF line endings for older Windows tools.
  • For IDs and phone numbers, import with Data → From Text/CSV and set the column to Text to keep every digit.

Want YAML instead? Use JSON to YAML. Generating types for the same data? Try JSON to TypeScript.

Questions people ask

What JSON can be turned into a CSV?
An array of objects works best: each object becomes a row and each key a column. If you paste an object that contains an array (like an API response with a data or items list), the converter finds the array and uses it.
How are nested objects handled?
They’re flattened into dotted column names, so {"address":{"city":"Leeds"}} becomes an address.city column. Arrays of simple values can be joined into one cell; other arrays are written as JSON.
Why does Excel mangle my CSV?
Excel guesses types when it opens a CSV. It drops leading zeros from phone numbers and postcodes, rounds long IDs to 15 digits, and turns things like 1-2 into dates. The converter warns you about values at risk, and the download includes a byte order mark so Excel reads accents and symbols correctly.
What is CSV injection?
A cell that starts with =, +, - or @ can run as a formula when the file is opened in a spreadsheet, which attackers can abuse. Turn on “Protect formulas” to prefix those cells with a quote so they’re shown as text.
Can I convert CSV to JSON?
Yes. Switch the direction and paste a CSV. The delimiter (comma, semicolon, tab or pipe) is detected, the first row is used as keys, and numbers and true/false can be converted to real JSON types. Dotted headings can be turned back into nested objects.
↑↓ move↵ openesc close