Home/Tools/Converters/JSON to CSV Converter

JSON to CSV Converter

Converters

Convert JSON data to CSV format.

⚡ Instant🔒 Private, in your browser🆓 Free, no sign-up👥 For everyone
Your data never leaves your browser. We do not store inputs.

What JSON to CSV Converter does

JSON to CSV Converter turns JSON data into a CSV spreadsheet, flattening nested objects and arrays into rows and columns you can open in Excel or Google Sheets. Paste your JSON and download a ready-to-use CSV file.

FV
Reviewed by the FreeToolsVerse team · Last updated · How we check our tools

Features and benefits

  • Builds the header from every key found in any record, leaving blanks where a record has no value
  • Flattens nested objects into dotted columns such as address.city, or keeps them as JSON text if you turn flattening off
  • Quotes fields correctly (RFC 4180), so names with commas, quotes or line breaks stay intact
  • The downloaded file includes a byte-order mark so Excel reads accented characters correctly

How to use JSON to CSV Converter

  1. Paste a JSON array of objects (or a single object) into the input area, or open a .json file
  2. Choose the delimiter and whether nested objects should be flattened into columns such as address.city
  3. Click Convert to CSV
  4. Copy the CSV or download it as data.csv

Who should use it

Made for everyone. Typical uses:

  • Turning an API response into a spreadsheet for analysis
  • Preparing JSON data for import into Excel or Google Sheets
  • Sharing structured data with someone who doesn't work with JSON

Example

The sample records {"name":"Ada","age":36,"address":{"city":"London"}} and {"name":"Sam, Jr.","age":41,"tags":["a","b"]} give the header name,age,address.city,tags. The second row is "Sam, Jr.",41, an empty cell, and ["a","b"] as JSON text in one quoted cell.

Limitations and accuracy

Nested objects are flattened into columns, but arrays are not expanded: a list is written as JSON text in a single cell, so a record with several items still gives one row. Very large files depend on your browser's memory, and spreadsheet programs may reformat identifiers such as 02134 when they open the file.

Accuracy: Conversions use well-known methods and are tested with real sample inputs. Check the output before you send or publish it.

Expert Tip

If each record holds a list you want as separate rows, extract that inner array first and convert it on its own. When you open the CSV in Excel, import it through the Data menu and set ID columns to Text to keep leading zeros.

Frequently asked questions

Does it handle nested JSON objects?
Yes. With flattening on, a nested object becomes dotted columns such as address.city. With it off, the object stays in one cell as JSON text. Arrays are always written as JSON text in a single cell.
What if my JSON has inconsistent fields across records?
The header contains every key found in any record, and a record that lacks a key gets an empty cell in that column.
Which delimiters can I use?
Comma, semicolon, tab or pipe. A field is quoted when it contains the delimiter you chose, a quotation mark, a line break or a leading or trailing space.
Is my data uploaded anywhere?
No. The conversion happens locally in your browser.
Can I convert large JSON files?
Yes, you can open a .json file directly, though very large files depend on your browser's available memory.

JSON to CSV Converter: the complete guide

What the converter does

The JSON to CSV Converter takes a JSON array of objects, or a single object, and turns it into comma-separated text that spreadsheets can open. You paste the JSON or open a .json file, choose the delimiter and whether to flatten nested objects, and press Convert to CSV. The result can be copied or downloaded as data.csv. Nothing is uploaded, because the conversion runs in your browser.

A worked example

The Try an example button loads two records: Ada, aged 36, living in London, and "Sam, Jr.", aged 41, with a list of tags. With the default settings the output has four columns.

  • Header: name,age,address.city,tags
  • Row 1: Ada,36,London, and an empty last cell, because Ada has no tags.
  • Row 2: "Sam, Jr.",41, an empty address.city cell, and the tags written as ["a","b"] inside one quoted cell.
  • The header is built from every key found in any record, so a field that appears in only some records still gets a column and the other rows are left blank.

Flattening and delimiters

With flattening on, a nested object becomes dotted columns, so {"address":{"city":"London"}} becomes the column address.city. With it off, the whole object stays in one cell as JSON text. Arrays are not expanded in either mode: a list is written as JSON text in a single cell, with its quotation marks doubled as the CSV format requires. The delimiter can be a comma, semicolon, tab or pipe. A field is quoted only when it contains the delimiter you chose, so "Sam, Jr." is quoted with commas but written as plain text when you pick a semicolon.

Rules the output follows

The output follows the RFC 4180 CSV standard. A field is wrapped in double quotes when it contains the delimiter, a quotation mark, a line break, or a space at either end, and quotation marks inside it are doubled. Missing values and null become empty cells. Numbers and true or false values are written as plain text. Rows are separated by carriage return and line feed. The downloaded file begins with a byte-order mark, which lets Excel read accented letters and other non-English characters correctly.

Shapes that need preparation

A flat array of similar objects converts best. A single object gives one row, and an array of plain values such as [1,2,3] gives one column named value. An empty array returns an error, and invalid JSON returns the parser message with the problem; the JSON Formatter and the guide on common JSON errors help you repair it. If each record contains a list of objects, such as an order with several items, the list stays in one cell. To get one row per item, extract the inner array first and convert that.

Opening the file in a spreadsheet

Double-clicking a CSV opens it in Excel, which guesses the type of each column. It may turn an identifier such as 02134 into 2134, or show a long number in scientific notation. Both changes are Excel's, not the file's. Import the file through the Data menu and set those columns to Text. In regions where Excel expects a semicolon as the separator, choose the semicolon delimiter before converting. Google Sheets reads the comma version without any extra steps.

Going the other way

The CSV to JSON Converter reverses the process. To check a document before converting it, run it through the JSON Validator, and to compare two versions of the same data use the JSON Diff Checker. Very large files depend on your browser's available memory.

Learning resources

Explore more in Converters, read the guides and articles, or see how we test our tools.

Share This Tool