JSON to CSV Converter

Paste a JSON array or object and get a clean CSV instantly. Choose your delimiter, flatten nested fields, and download the result — no upload needed.

Share this tool
input.json

Options

chars lines
Samples:

Converting...

Paste a JSON array or object above and click Convert → to get the CSV output.

JSON vs CSV — When to Use Each

JSON (JavaScript Object Notation) is hierarchical, schema-flexible, and the default output format for REST APIs, databases like MongoDB, and configuration files. It handles nested structures, arrays, and mixed types natively. CSV (Comma-Separated Values) is flat, tabular, and universally readable — Excel, Google Sheets, pandas, R, and every SQL database support it directly.

You typically convert JSON to CSV when you want to load API response data into a spreadsheet, import records into a relational database, share data with non-technical colleagues, or pass rows to a data analysis pipeline. The conversion step flattens the hierarchy and gives every row the same columns.

Use JSON when:

  • → Data has deeply nested structures
  • → Schema varies between records
  • → You need arrays within rows
  • → Communicating between APIs

Use CSV when:

  • → Opening data in Excel or Sheets
  • → Loading into a SQL database
  • → Passing to pandas or R data frames
  • → Sharing with non-technical users

How Nested JSON Is Handled

CSV is inherently flat, so nested JSON objects must be handled one of two ways:

Without Flatten (default)

Nested objects and arrays are serialised as a compact JSON string and placed in a single cell. Fast and lossless — great for archival or round-tripping.

key address
cell {"city":"NY"}

With Flatten (dot notation)

Each nested key becomes its own column using dot notation. Best for analysis — every value ends up in its own cell and is directly queryable.

key address.city
cell NY

Arrays inside objects (e.g. "tags": ["a","b"]) are always serialised as a JSON string regardless of the flatten setting — expanding arrays would create a variable number of columns which breaks tabular structure.

Choosing the Right Delimiter

DelimiterCharacterBest forWatch out for
Comma,RFC 4180 standard; widest compatibilityFields that contain commas need quoting (handled automatically)
Tab⇥ (TSV)Data containing commas; log formatsSome tools don't detect TSV automatically — rename to .tsv
Semicolon;Excel on European locales (uses ; as default)English-locale Excel won't auto-detect; use Data → Import
Pipe|ETL pipelines, log processing, shell scriptsRarely found in natural text, so rarely needs quoting

CSV Quoting and Special Characters

This converter follows RFC 4180, the de-facto CSV standard. Fields are automatically double-quoted when they contain the delimiter character, double-quote characters, or line breaks. Embedded double-quotes are escaped by doubling them ("").

Examples of automatic quoting

Value with, comma → output as "Value with, comma"
She said "hello" → output as "She said ""hello"""
Line one\nLine two → output as "Line one\nLine two"

Unescaped CSV files break silently in Excel and pandas — an unquoted comma shifts every subsequent column, and an unquoted quote causes a parse error or data truncation. RFC 4180 quoting prevents all of these issues automatically.

Frequently Asked Questions

What JSON shapes does this converter support?

Three shapes are supported: an array of objects (most common — each object becomes a row), a single object (outputs one data row), and an array of arrays (treated as raw rows; if the first sub-array is all strings it becomes the header row). Primitive values at the top level are not supported.

Why are some cells empty in my output?

When objects in the array have different keys, the converter builds a union of all keys as the header row. Any object that is missing a column outputs an empty string for that cell. This keeps columns aligned across all rows. A warning is shown when this happens. JSON null values also output as empty strings.

How do I open the CSV in Excel?

Download the file and double-click it for English-locale Excel (comma delimiter). for European-locale Excel (which defaults to semicolon), use the semicolon delimiter option, then open via Data → From Text/CSV and select semicolon as the separator. for Google Sheets, just drag and drop the .csv file — it auto-detects the delimiter.

Can I convert deeply nested JSON?

Yes — enable Flatten nested. The converter recursively expands nested objects using dot notation at any depth. Arrays inside objects are serialised as a JSON string rather than further expanded, since arrays have variable length and would create an inconsistent number of columns.

Is my JSON data sent to a server or stored?

The JSON is sent to our server to run the conversion — that is unavoidable for a server-side tool. However, nothing is logged, stored, or shared. The input is processed in memory and discarded immediately after the response is sent.

Related Tools