Convert JSON to CSV

Turn JSON records into a spreadsheet-ready CSV. Nested objects become dotted column names and every key across all records gets a column.

Drop your file here, or browse

Images, documents, spreadsheets, data files and subtitles. Your file stays on your device.

Your file is converted on this device and is never uploaded to a server.

Getting JSON into a spreadsheet

APIs, databases and web apps speak JSON, but most people analyze data in Excel, Google Sheets or Numbers. CSV is the bridge: a plain table that every spreadsheet can open. The hard part is that JSON is hierarchical and CSV is flat, and naive converters either crash on nested data or fill cells with [object Object].

This converter flattens nested objects into columns such as address.city, joins simple lists into a single cell, and builds the header from every key that appears in any record, not just the first one. The CSV follows RFC 4180, so commas, quotes and line breaks inside values are quoted correctly.

JSON vs CSV at a glance

Main differences between the JSON and CSV formats
FeatureJSONCSV
Full nameJavaScript Object NotationComma-Separated Values
TypeHierarchical dataTabular data
IntroducedEarly 2000s (RFC 4627 in 2006)Early 1970s; described by RFC 4180 in 2005
Created byDouglas Crockford; now ECMA-404 and RFC 8259No single owner
StructureNested objects and arraysFlat rows and columns
CommentsNoNo
Data typesString, number, boolean, null, object, arrayText only, no built-in types
Best forAPIs, web apps and app settingsSpreadsheet exports and database imports
SupportEvery programming languageExcel, Google Sheets, databases and every language
MIME typeapplication/jsontext/csv

How to convert JSON to CSV

  1. Step 1: Prepare a .json file

    Save your API response or export as a .json file. An array of objects works best.

  2. Step 2: Drop it on the converter

    The file is parsed in your browser; invalid JSON is reported instead of silently skipped.

  3. Step 3: Convert to CSV

    Records are flattened, columns are collected and the table is written with standard quoting.

  4. Step 4: Open in your spreadsheet

    Download the .csv and open it in Excel, Google Sheets or LibreOffice.

How JSON is mapped to rows and columns

Nested objects flattened

{"user": {"name": "Ana"}} becomes a user.name column.

All keys included

Records with extra fields add columns instead of losing data.

Wrapped arrays detected

Responses like {"data": [...]} use the inner array as the rows.

Lists handled

Arrays of simple values are joined with commas; arrays of objects are kept as JSON text.

Common JSON to CSV tasks

  • Analyzing API data. Pull records from a REST API and pivot them in a spreadsheet.

  • Sharing with non-developers. Give colleagues a file they can open with a double click.

  • Importing into other tools. CRMs, email platforms and databases usually import CSV.

  • Quick data checks. Scan hundreds of records in a grid instead of scrolling JSON.

How different JSON shapes are handled

An array of objects gives one row per object, which is the ideal input. If the top level is an object that contains exactly one array of objects, as many APIs return with a data or results property, that array is used as the rows and the surrounding metadata is ignored. Any other object becomes a single row, and an array of plain values becomes a one-column table named value.

Null values become empty cells. Booleans and numbers are written as text, which spreadsheets recognize automatically when you open the file.

  • [ {...}, {...} ]: one row per object.
  • { "data": [ {...} ] }: rows from the data array.
  • { "a": 1, "b": 2 }: a single row.

Opening the CSV in Excel

The file is saved as UTF-8. Current versions of Excel usually detect this, but if accented characters look wrong, import it through Data, From Text/CSV and choose UTF-8 as the file origin.

Excel may also reformat values that look like dates or long numbers, such as order IDs. Importing with the From Text/CSV wizard lets you set those columns to Text, or you can use the CSV to XLSX converter to create a workbook where IDs with leading zeros stay as text.

Tips for clean CSV output

  • Validate large JSON files in a code editor first; one missing comma stops the whole conversion.
  • Deeply nested arrays of objects are better flattened in code before exporting.
  • Rename dotted columns in the spreadsheet if you need friendlier headers.
  • Going the other way later? The CSV to JSON converter reads the same format back.

JSON to CSV questions

How are nested objects handled?

They are flattened into columns with dot notation, for example address.city and address.zip.

What if records have different fields?

Every key from every record becomes a column. Records without a value for a column get an empty cell.

What happens to arrays inside records?

Arrays of simple values are joined into one cell with commas. Arrays of objects are stored as JSON text in the cell.

Is there a size limit?

No fixed limit. Files of several megabytes convert quickly; very large files depend on your device's memory.

Which delimiter does the CSV use?

A comma, with double quotes around values that contain commas, quotes or line breaks.

Is my data uploaded?

No. Parsing and conversion happen entirely in your browser.

Related conversions