1
OneClickUse
Converters Tool

JSON to CSV

Convert an array of JSON objects into CSV rows with headers.

Privacy-first workflows
Fast and simple
100% Free, no signup

Written by Anil Gautam · Updated

How does JSON to CSV build the columns?

The converter parses your JSON, wraps a single object in an array, and collects every key from every object in the order each first appears. Those keys form the header line. Each object then becomes one row with a cell for every header. Strings are wrapped in double quotes, numbers and true or false are written bare, and a missing key or a null value becomes an empty quoted cell.

Paste [{"name":"Asha","marks":91,"city":"Pune"},{"name":"Ravi","marks":78,"remarks":"Re-test"}] and the header comes out as name,marks,city,remarks. Asha's row reads "Asha",91,"Pune","" and Ravi's reads "Ravi",78,"","Re-test".

Because of that ordering, a key the first object lacks is placed after all of that object's keys. To control the column order, give the first object every key in the sequence you want, even with empty values. String values keep their quotes, which means an ID stored as "0042" arrives in the CSV with its leading zeros, although a spreadsheet may still strip them when it opens the file.

Which JSON shapes break the CSV?

Nested values are the main problem. An array or object inside a record is written as raw JSON text without surrounding quotes, so {"tags":["a","b"]} produces the cell ["a","b"], and a spreadsheet splits it at the comma. Join such lists into one string, or lift nested fields to the top level, before converting. Wrapped API responses are another trap: a body like {"data":[...]} gives one column named data that holds the whole array as text, so paste only the array inside it.

Quotes inside strings are escaped JSON-style with a backslash, as in "He said \"hi\"". CSV readers expect a doubled quote, so that cell may split or show stray backslashes when opened. Line breaks inside strings are written as the two characters \n, which keeps each record on one line. Header names are not quoted, so a key that contains a comma shifts every column after it.

How do I open the CSV in a spreadsheet?

The page has no download button, so copy the output into a plain-text file saved with a .csv extension and open it in Excel, Google Sheets or LibreOffice Calc. Conversion happens in your browser, and nothing is uploaded. If the JSON has a syntax error, such as a trailing comma or single quotes around keys, the output box shows the browser's parser error in place of CSV. JSON Validator formats valid JSON with indentation, which makes nesting easy to spot before you convert. For the reverse direction, use CSV to JSON.

How it works

How to convert JSON to CSV

STEP 01
Paste a JSON object or array.
STEP 02
The tool detects keys and builds CSV headers.
STEP 03
Copy the CSV output.
Learn more

Related guides

You might also need

Related tools

Converters
Text to Binary Converter
Convert readable text to binary bytes or binary back to text.
Use now
Converters
Unit Converter
Convert common weight, length, volume, area, and temperature units instantly.
Use now
Converters
JSON Validator
Validate JSON, see parse errors, and copy formatted output.
Use now
Converters
Decode JWT Token Online Safely
Decode JWT headers and payloads locally in your browser, inspect claims, and verify HMAC signatures when you have the secret.
Use now
Converters
YAML to JSON Browser Converter
Convert YAML to JSON or JSON to YAML locally in your browser without uploading config files, secrets, or CI snippets.
Use now
Converters
JSON Minifier
Minify JSON to the smallest possible size for APIs and config files.
Use now
FAQ

Common questions