JSON to CSV Converter

Convert JSON to CSV online: paste an array of objects and get properly quoted CSV with flattened nested fields, a live table preview and a .csv download.

Table preview

Linecolumn

Convert JSON to CSV Online

APIs, databases and logging tools speak JSON, but spreadsheets, BI tools and most import screens still expect CSV. This JSON to CSV converter turns an array of JSON objects into a table: every object becomes a row and every key becomes a column, even when the objects do not all share the same keys.

Nested objects are flattened into dot-path columns such as address.city, arrays can be joined, kept as JSON or expanded into numbered columns, and every value is quoted according to RFC 4180. The conversion runs entirely in your browser, so the data you paste is never uploaded.

JSON objects converted to CSV rows[{ … }]id,nameJSON to CSVConverter

How to convert JSON to CSV

  1. Paste your JSON into the left box, open a .json file, or start from the sample. The CSV updates as you type.
  2. Pick a delimiter. Comma is the standard; choose semicolon for Excel in locales that use a decimal comma, or tab for TSV.
  3. Choose how arrays are written and whether nested objects are flattened into separate columns.
  4. Check the table preview to confirm the columns look right. Errors are shown with the line and column where the JSON breaks.
  5. Copy the CSV or download it as a .csv file.

How nested JSON is flattened

CSV is flat, so nested data has to become columns:

  • Nested objects become dot paths. {"user": {"address": {"city": "London"}}} produces the column user.address.city. Untick “Flatten nested objects” to keep each nested object as a JSON string in one cell instead.
  • Arrays of plain values such as "tags": ["math", "poetry"] are joined into math; poetry, kept as ["math","poetry"], or expanded into tags.0 and tags.1.
  • Arrays of objects are written as JSON in “Join values” mode, because joining them would lose their structure. Use “Expand to columns” to get items.0.sku, items.1.sku and so on.
  • Different keys per object are merged: the header is the union of all keys in the order they first appear, and missing values are left empty.
  • null, empty objects and empty arrays become empty cells; true and false are written as text.
  • A wrapper object such as {"data": [ … ]} is detected: the first array of objects inside it is converted, and the tool tells you which key it used.

CSV quoting rules (RFC 4180)

Fields are quoted only when needed, and inner quotes are doubled, which is what Excel, Google Sheets and CSV libraries expect:

JSON valueCSV fieldWhy
"London"LondonNothing special, no quotes needed
"Wilmslow, Cheshire""Wilmslow, Cheshire"Contains the delimiter
"Say \"hi\"""Say ""hi"""Quotes are escaped by doubling them
"Line 1\nLine 2"Quoted, with the line break kept insideContains a line break
" padded "" padded "Keeps leading and trailing spaces
"=SUM(A1:A9)"'=SUM(A1:A9)Only with “Escape formulas” ticked

Delimiters and line endings

OptionUse it for
Comma ,The RFC 4180 default. Works with Google Sheets, databases, pandas and most import tools.
Semicolon ;Excel in regions where the comma is the decimal separator, such as Germany, France or Brazil.
TabTSV files, and pasting straight into spreadsheet cells.
Pipe |Legacy systems and data that contains many commas.
CRLF / LFRFC 4180 specifies CRLF; LF is the macOS and Linux convention. Modern tools read both. Applies to the downloaded file.

Tips for clean CSV exports

  • Excel shows garbled characters? Excel guesses the encoding of a CSV file. The UTF-8 byte order mark (BOM) tells it the file is UTF-8, so names like “Zoë” or “東京” display correctly.
  • Sharing a file with other people? Tick “Escape formulas”. Cells starting with =, +, - or @ can run as formulas when opened in a spreadsheet (CSV injection).
  • Large numbers: JSON numbers are read as JavaScript numbers, so integers above 9,007,199,254,740,991 lose precision and 1.50 becomes 1.5. Store IDs as strings in JSON to keep them exact.
  • Need the reverse? Use the CSV to JSON converter, or open the CSV in Excel with CSV to Excel.

Frequently Asked Questions

Common questions about converting JSON to CSV.

Paste a JSON array of objects into the converter. Each object becomes a row, each key becomes a column header, and you can copy the CSV or download it as a .csv file.

Yes. Nested objects are flattened into dot-path columns such as address.city, and arrays can be joined into one cell, kept as JSON or expanded into numbered columns.

The header contains every key found in any object, in the order they first appear. Rows that do not have a key get an empty cell in that column.

Excel uses your region’s list separator. If it expects semicolons, choose the semicolon delimiter, or import with Data → From Text/CSV and pick the delimiter there.

No. The JSON is parsed and converted by JavaScript in your browser, and the download is created locally.

Yes. A single object becomes one CSV row. If the object wraps an array, such as {"results": [ … ]}, that array is converted instead.

Values that contain the delimiter, a double quote or a line break are wrapped in double quotes, and inner quotes are doubled, exactly as RFC 4180 describes.

JSON needs double quotes around keys and strings and does not allow trailing commas or comments. The error message shows the line and column of the first problem.