JSON to CSV Converter

Convert JSON to CSV and CSV to JSON in your browser: flatten nested objects to dot paths, choose comma, semicolon, tab or pipe delimiters, handle arrays and quoted fields, and detect types.

About this tool

Turning JSON into CSV sounds simple until the JSON has nested objects, arrays, or rows with different keys. This converter is built for exactly that: it flattens nested objects into dot-path columns (address.city), builds the header from every key that appears in any row, lets you choose how arrays are written, and escapes quotes, delimiters and line breaks the way RFC 4180 describes. It also goes the other way, parsing CSV with quoted fields and embedded newlines into JSON, with delimiter auto-detection and optional type detection. For converting between JSON, YAML and CSV in one place, use the Data Format Converter; this page is the dedicated JSON and CSV tool with control over delimiters, flattening and arrays. Everything runs in your browser.

How to use it

  1. Choose JSON to CSV or CSV to JSON, then paste your data into the input box (or click Load sample to see an example).
  2. For JSON to CSV, pick the delimiter (comma, semicolon, tab or pipe), how arrays should be written, and whether to include a header row. Nested objects become dot-path columns automatically.
  3. For CSV to JSON, leave the delimiter on Auto-detect or set it yourself, say whether the first row is a header, and choose whether to turn numbers, true/false and empty cells into real JSON types. Tick the dot-path option to rebuild nested objects.
  4. Check the row and column summary under the output, then click Copy or Download. Use as input flips the result back into the other direction so you can check a round trip.

FAQ

How are nested objects handled?

Each nested key becomes its own column named with a dot path, so {"address": {"city": "London"}} produces a column called address.city. Going back from CSV to JSON, tick "Rebuild nested objects from dot paths" to turn those columns into nested objects again.

What happens to arrays inside a row?

You choose. "Keep as JSON text" writes the array as a JSON string in one cell, "Join values" writes primitive items separated by "; " (arrays of objects fall back to JSON text), and "One column per item" creates tags.0, tags.1 and so on. The last option gives the most spreadsheet-friendly result when arrays are short.

What if the objects do not all have the same keys?

The header is the union of every key found in any row, in the order each key first appears. A row that lacks a key gets an empty cell in that column, so nothing is dropped and the columns stay aligned.

How are commas, quotes and line breaks inside values written?

A value that contains the delimiter, a double quote or a line break is wrapped in double quotes, and any double quote inside it is doubled, which is the RFC 4180 rule that Excel, Google Sheets and most parsers expect. The CSV reader understands the same rules, including quoted fields that span several lines.

Can it detect the delimiter?

Yes. In CSV to JSON mode, Auto-detect looks at the first lines and picks comma, semicolon, tab or pipe, whichever splits them into the same number of columns. The summary tells you which one it chose. If a file is unusual, set the delimiter by hand.

What does "Detect numbers, booleans and null" do?

CSV has no types, so every cell is text. With the option on, cells like 42 or 3.5 become numbers, true and false become booleans, and empty cells and the word null become null. Numbers with leading zeros and very long digit strings stay as text so IDs and phone-like values are not changed. Turn the option off to keep every value as a string.

What does it do with a top-level object or a list of plain values?

A single JSON object is treated as one row. A list of plain values such as [1, 2, 3] becomes one column called value. Invalid JSON shows the parser message instead of producing partial output.

Is my data uploaded anywhere?

No. Parsing and conversion happen in your browser with this page's own code, so the data you paste never leaves your device.

Related tools

Guides & comparisons

← All tools · Converters · Blog · Cheat sheets · FAQ