JSON to CSV converter

Paste a JSON array of objects and get a CSV ready for Excel or Google Sheets. Columns are merged across all objects and special characters are quoted correctly. Free, and nothing leaves your browser.

How to use it

  1. Paste your JSON array into JSON (array of objects).
  2. Choose the Separator. Use semicolon if your spreadsheet expects it.
  3. Optionally clear Include header row or turn on Quote every field.
  4. Copy the CSV or click Download to save a .csv file.

Complete guide to converting JSON to CSV

Why convert JSON to CSV

JSON is how APIs, databases and apps exchange data, but spreadsheets, accounting tools and many import screens only understand rows and columns. CSV (comma-separated values) is that common ground: a plain text file where each line is a record and each value is separated by a delimiter. Converting by hand is slow and easy to get wrong, because a single comma or quotation mark inside a value can shift every column after it. This converter does the work in your browser, so the data you paste is never uploaded.

How the conversion works

The tool expects a JSON array of objects, such as a list of customers or orders. A single object is accepted too and is treated as an array with one item. Every distinct key becomes a column, in the order it first appears. If an object does not have a key that others have, its cell in that column is left empty. A null value also becomes an empty cell, and numbers and true or false are written as plain text.

Nested objects and arrays are not split into extra columns. They are written into one cell as JSON text, so nothing is lost. If you need separate columns for a nested object, flatten the data before converting.

If every item in the array is itself an array, such as [[1,"a"],[2]], each one becomes a row exactly as given. No header is created, and shorter rows are padded with empty cells to match the longest one.

Quoting rules

A field is wrapped in double quotes when it contains the separator, a double quote, a line break, or spaces at the start or end. Double quotes inside the field are doubled. This is the standard CSV convention, so Excel, Google Sheets, Python and databases all read it the same way. Turn on Quote every field if the system you import into insists on quotes around everything.

Worked example

  1. Paste [{"name":"Ana","age":31},{"name":"Smith, John","age":45,"note":"said \"hi\""}] into JSON (array of objects).
  2. Leave Separator on Comma (,) and keep Include header row checked.
  3. The summary shows 2 data rows and 3 columns, and the CSV is:

name,age,note
Ana,31,
"Smith, John",45,"said ""hi"""

Notice three things: the third column note exists only because the second object has it, so Ana gets an empty cell; the name with a comma is quoted; and the inner quotes are doubled.

Choosing the separator

OptionWhen to use it
Comma (,)Default for most tools, code and APIs
Semicolon (;)Excel installations whose regional settings use a decimal comma, common in Europe and Latin America
TabData pasted straight into a spreadsheet, or values that contain many commas

Tips and common mistakes

  • Header names come from the keys of the first objects. If the same field is spelled differently across items (e-mail and email), you will get two columns.
  • Very long numbers such as ID cards or phone numbers may be shown in scientific notation or lose leading zeros when a spreadsheet opens the file. Import the column as text if that happens.
  • If accents look broken when opening the file, import it as UTF-8 text instead of double-clicking it.
  • The input must be valid JSON: double-quoted keys, no trailing commas. The error message tells you what the parser found.

Related tools

To go in the opposite direction use the CSV to JSON converter. To check or reformat the source data first, try the string escape tool, and to clean repeated rows afterwards use the duplicate line remover.

Questions

What if the objects have different keys?

The columns are the union of all keys, in the order they first appear. An object that lacks a key gets an empty cell in that column.

What happens to nested objects and arrays?

They are written into a single cell as JSON text, so no data is lost. Flatten the data first if you need separate columns.

How are commas, quotes and line breaks handled?

A field containing the separator, a double quote or a line break is wrapped in double quotes, and inner quotes are doubled. This is the standard CSV rule.

Can I convert an array of arrays?

Yes. If every item is an array, each one becomes a row as is, with no header. A single object is treated as an array with one item.