Skip to content
Data Tool

JSON to CSV Converter

Turn JSON into spreadsheet-ready CSV without uploading data.

Input

About This Tool

Convert JSON arrays or objects into CSV instantly in your browser. Flatten simple nested objects and copy the result. Everything runs locally in your browser: nothing you paste is uploaded, stored, or logged, and there is no sign-up or usage limit. Read the full guide below for worked examples, best practices, and common mistakes to avoid.

Frequently Asked Questions

What JSON formats work?

The converter supports an array of objects, a single object, or arrays of simple values.

Does it handle nested objects?

It flattens simple nested objects using dot notation, such as user.name and user.email.

Is my JSON uploaded?

No. Conversion happens locally in your browser.

How to convert JSON to CSV without losing data

To convert JSON to CSV, paste an array of objects into the converter. Each object becomes a row, each key becomes a column header, and nested objects are flattened into dot-notation columns such as address.city. The result is plain text you can paste into Excel, Google Sheets, or any import form.

JSON and CSV model data differently. JSON is a tree: objects hold objects, arrays hold anything. CSV is a flat grid: one header row, then rows of values. Every JSON-to-CSV conversion is really a flattening decision, and knowing how this tool makes those decisions saves you from surprises in the spreadsheet.

Step by step: using the converter

  1. Copy your JSON from an API response, a browser network tab, a database export, or a file.
  2. Paste it into the JSON input box. Press Convert JSON to CSV. Use Load sample first if you want to see the expected shape.
  3. Check the four stat tiles: rows, columns, status, and CSV size. If the status says Invalid JSON, the output panel shows the parser's error message instead of CSV.
  4. Copy the CSV from the output panel and paste it into a spreadsheet, or save it as a .csv file in a text editor.
  5. Spot-check the column count against what you expected. A surprise extra column usually means one record has a key the others lack.

Everything runs in your browser. The JSON never leaves your device, which matters when the data contains customer emails, order details, or internal IDs.

What the converter does to your data

These are the exact rules, so you can predict the output before you convert.

JSON inputCSV result
Array of objectsOne row per object
A single objectOne row
Array of plain values, such as [1, 2, 3]A single column named value
Nested object {"user":{"name":"Ana"}}Column user.name
Array of simple values ["a","b"] inside a fieldOne cell: a; b
null or a missing keyEmpty cell
Text with a comma, quote, or line breakWrapped in double quotes, inner quotes doubled

The header row is the union of all keys found across every record, in the order each key first appears. That is why records with different shapes still line up: a record missing a key just gets an empty cell in that column.

A worked example

Input

[
  {"id": 1, "name": "Ana", "address": {"city": "Lyon", "zip": "69001"}},
  {"id": 2, "name": "Sam, Jr.", "address": {"city": "Oslo"}}
]

Output

id,name,address.city,address.zip
1,Ana,Lyon,69001
2,"Sam, Jr.",Oslo,

Notice three things. The nested address object became two columns. The comma inside "Sam, Jr." forced quotes around that cell, otherwise the name would split into two columns. And Sam has no zip, so the last cell is empty, leaving a trailing comma.

Why the quoting rules matter

CSV looks trivial until a value contains the delimiter. The formal description is RFC 4180. It says fields containing commas, double quotes, or line breaks must be enclosed in double quotes, and a double quote inside a field is escaped by writing it twice. So He said "hi" becomes "He said ""hi""".

Hand-built CSV from string concatenation fails on exactly these cases. Product descriptions, addresses, and free-text comments are the usual culprits. The converter applies the quoting rule to every cell, so multi-line text stays in one cell instead of breaking into extra rows.

Watch out: RFC 4180 specifies CRLF line endings, while this tool joins rows with a plain newline (LF). Excel, Google Sheets, LibreOffice, pandas, and nearly every importer accept both. Only a few strict legacy systems ask for CRLF. If yours does, re-save the file with CRLF line endings in a code editor.

Known limits and how to work around them

Arrays of objects

Arrays inside a field are joined with ; . That works for tags like ["red","blue"]. It does not work for arrays of objects, such as an order's items list, because each object has no readable text form and ends up as [object Object]. Fix this before converting: pull the array out and make each element its own top-level record, adding the parent ID to each. Then convert the two lists separately and join them in your spreadsheet with a lookup.

Leading zeros and long numbers

The zip "01234" is safe in the CSV text, but Excel may turn it into 1234 on open because it guesses a number type. Long IDs such as 16-digit numbers can be shown in scientific notation. In Excel, import with Data → From Text/CSV and set the column type to Text. Google Sheets lets you set the column to Plain text after import.

Accented and non-Latin text

The output is Unicode. Double-clicking a UTF-8 CSV in older Excel versions can garble characters like é or 東. Import through the Data menu and pick UTF-8, or open the file in Google Sheets first.

Spreadsheet formula injection

If a cell begins with =, +, -, or @, spreadsheet software may treat it as a formula. When the JSON comes from user input, such as form submissions, review those cells before you open the file. OWASP's CSV injection page explains the risk and the standard defence, which is to neutralise such values on export, for example with a leading apostrophe.

Common mistakes

  • Pasting JavaScript, not JSON. Single quotes, trailing commas, and unquoted keys are valid in JavaScript but not in JSON. If you see Invalid JSON, run the text through the JSON formatter to find the exact bad character.
  • Pasting several JSON documents at once. Newline-delimited JSON (one object per line) is not a single valid document. Wrap the lines in [ ] and add commas between them.
  • Assuming column order matches your schema. Order follows first appearance. Reorder columns in the spreadsheet if a downstream import expects a fixed sequence.
  • Expecting a deep tree to stay readable. Five levels of nesting produce column names like order.customer.billing.address.city. Consider trimming the JSON first.

Where this converter earns its keep

Marketers and analysts

Many tools offer a JSON export but no CSV. Convert the export, drop it in a sheet, and build pivots without writing code.

Developers

Turn an API response into a fixture file, or share a handful of records with a non-technical teammate. Because nothing is uploaded, pasting a production sample is less risky than with an online service that processes data on a server.

Small business owners

Store platforms, form tools, and booking systems often hand over JSON. A CSV opens in the spreadsheet you already use and imports into accounting or mailing-list software.

Students and researchers

Public datasets and social APIs ship as JSON. CSV is what R, Python's pandas, and survey tools read most easily.

After converting, you can inspect the result in the CSV viewer to confirm the columns look right before you import it elsewhere.

A quick checklist before you import

  1. Row count matches the number of records you expected.
  2. No cell contains [object Object].
  3. ID-like and zip-like columns are set to Text on import.
  4. Free-text columns with commas or line breaks still sit in one cell.
  5. No unexpected cells starting with =, +, -, or @.

More questions

Can I convert a very large JSON file?

The tool runs in your browser's memory, so the practical limit is your device. Files of a few megabytes convert instantly. For hundreds of megabytes, use a command-line tool such as jq or a script, and stream the data instead.

Why are some of my columns empty for most rows?

Those keys only exist in a few records. The header row includes every key found anywhere, so sparse keys create mostly-empty columns. That is expected, and it keeps every value.

How do I get a different delimiter, like a semicolon or tab?

The output uses commas. In Excel, you can import and choose the delimiter, or use find and replace on the output only if no cell contains the new delimiter. Commas inside quoted cells make a blind replace unsafe.

What happens if the top-level JSON is an array of arrays?

Each inner array is treated like an object with numeric keys, so you get columns named 0, 1, 2 and so on. Add your own header row afterwards.

Can I convert CSV back to JSON?

Not with this tool. You can load CSV into the CSV viewer to check its structure, then use a script or spreadsheet add-on to produce JSON.