JSON to CSV and CSV to JSON Converter

Paste an API response and download a CSV that opens correctly in Excel, or paste a spreadsheet and get JSON to use as a fixture. The content is converted in your browser and never sent to a server.

Conversion direction
CSV

The result shows up here

Paste JSON with a list of objects. Each object becomes a row.

Options

File format
Delimiter
Decimal separator
Nested JSON
Line break

Use it when the list comes inside an object, as in data.items. Leave it empty to use the whole JSON.

Only need to format, validate or minify the JSON?

JSON Formatter

How the conversion works

Which JSON becomes CSV

The converter accepts the shapes an API usually returns.

  • A list of objects: each object is a row and the keys become the header.
  • A single object: it becomes one row.
  • A list of plain values: it becomes one column called value.
  • A list of lists: it becomes rows without a header.

If the list comes inside an object, as in data.items, the converter shows the path it found and you use it with one click.

CSV for Excel with a decimal comma

Excel with regional settings that use a decimal comma, such as Brazil, Spain, France or Germany, splits columns on semicolons and writes numbers with a decimal comma. A comma-separated file opens entirely in the first column.

  • The Excel preset uses a semicolon, a decimal comma and a BOM.
  • The BOM is a marker at the start of the file that tells Excel the text is UTF-8. Without it, João shows up as João.
  • The BOM is only in the downloaded file. The text you copy has no BOM.

Nested JSON and different keys

Objects inside objects become dotted columns, such as address.city. Lists stay in one cell as JSON text, so a list of variable length does not create too many columns.

  • If the objects have different keys, the header gathers every key in the order they first appear. Where a key is missing, the cell is empty.
  • Empty objects and lists keep their column, with {} or [] in the cell.
  • With the JSON in one cell option, every nested object or list stays whole in one cell.

From spreadsheet to JSON fixture

When converting CSV to JSON, only text that is already a plain decimal number becomes a number.

  • Postal codes, phone numbers and codes with a leading zero, such as 01310100, stay text. With the decimal comma selected, 1,50 becomes 1.5.
  • true and false become booleans. A cell holding a JSON object or list becomes that object or list.
  • Dotted columns, such as address.city, become objects again. Pick Everything as text to keep the cells uninterpreted.
  • Repeated names get _2, _3, and blank names become column3, column4.

JSON to CSV Frequently Asked Questions

Answers for people who take API data to a spreadsheet and spreadsheets to JSON.