JSON to CSV Converter

Paste a JSON array of objects and get CSV with one row per object and one column per key, ready for a spreadsheet.

Free tools that run in your browser. Nothing you type, open or create is uploaded to NerdBible or anyone else.

YAML

Converted in your browser with js-yaml (MIT licence). YAML comments, anchors and custom tags have no JSON equivalent, so comments are dropped and anchors are written out in full. A YAML file with several documents separated by --- becomes a JSON array.

How to use it

  1. Pick the format: YAML, XML, CSV, TSV or TOON. Then pick the direction, such as JSON to YAML or TOON to JSON.
  2. Paste your data. The result updates as you type, and an error shows its line and column.
  3. Set the options: indent and key order for YAML, the declaration and value types for XML, the delimiter, header row and quoting for CSV and TSV, or the delimiter and indent for TOON.
  4. Copy or download the result, or press Swap to convert it back.

Questions

What JSON can be converted to CSV?

An array of objects, such as a list of users or orders, works best: each object becomes a row. A single object becomes one row, and nested objects and arrays are flattened into dotted columns.

Why do my columns look wrong in Excel?

Excel in some regions expects semicolons rather than commas. Choose the semicolon delimiter and download again.

How are nested objects handled?

They are flattened: a key inside an object becomes a column named parent.child, and array items get numbered columns such as tags.0.

About this tool

How JSON becomes a table

CSV is flat: rows and columns. JSON can nest objects inside objects, so the converter flattens each record before writing it.

  • Nested objects become dotted columns. An address object with a zip inside becomes a column named address.zip.
  • Arrays get numbered columns. A tags list becomes tags.0, tags.1 and so on, so no value is lost.
  • Every key gets a column. Records that lack a key leave that cell empty, so uneven data still lines up.
  • Quoting follows the CSV rules. A value containing the delimiter, a quote or a line break is wrapped in quotes, with inner quotes doubled. Choose Every field to quote everything.

Opening it in a spreadsheet

Download adds a byte order mark so Excel reads accented letters and other non-English characters correctly. If your Excel uses a comma as the decimal separator, as in much of Europe, choose the semicolon delimiter so columns split properly. Google Sheets and LibreOffice let you pick the delimiter when importing.

Your data is converted in your browser and is never sent anywhere.

Related tools