Dev Toolbox · Windows 10 and 11

Convert JSON to CSV

Paste a JSON array, such as an API response or a database export, and get a CSV table back as you type: one row per object, one column per key. Pick commas, semicolons or tabs to suit the program that will open it. The data never leaves your PC.

Updated

How to convert JSON to CSV

  1. 1

    Open JSON ↔ CSV

    In the Dev Toolbox, choose JSON ↔ CSV, second in the Data group, and set Direction to JSON → CSV.

  2. 2

    Paste the JSON

    Paste an array of objects into Input, like [{"name": "Ada", "year": 1815}]. A single object works too and becomes one row.

  3. 3

    Pick a separator

    Under Separator, choose Comma, Semicolon or Tab.

  4. 4

    Copy the CSV

    Press Copy above Result. Paste it into a spreadsheet, or into a text file saved under a .csv name.

How the JSON becomes a table

CSV is a flat table; JSON can be any shape. The converter maps one onto the other with a few clear rules:

  • Rows. Each item in the top-level array becomes one row. A single object becomes a table with one row.
  • Columns. Every key found in any object becomes a column, in the order the keys first appear. Objects do not need matching keys: where one lacks a key, its cell is left empty.
  • Header. The first line holds the column names.
  • Values. null becomes an empty cell, true and false are written as words, and numbers as digits.
  • Arrays of plain values, such as [1, 2, 3], become a single column called value.

So [{"id": 1, "name": "Ada"}, {"id": 2, "email": "g@example.com"}] gives three columns, id, name and email, with the gaps left blank.

Nested objects and arrays

APIs rarely return perfectly flat data. When a value is itself an object or an array, the converter keeps it whole and writes it into the cell as JSON text. An address like {"city": "Oslo", "zip": "0150"} lands in one cell exactly like that, and tags like ["new", "sale"] stay a list in a single cell.

Nothing is lost that way, and code can turn the cell back into data later. If you want the city in a column of its own, flatten the data before converting: bring the fields you need up to the top level in your query or script, so each one becomes a key of its own.

Numbers deserve a look too. Whole numbers are exact up to 9,007,199,254,740,991; longer IDs stored as JSON numbers, such as 19-digit order numbers, lose their last digits when read. IDs stored as strings in quotes are copied exactly. Excel adds its own limit of 15 significant digits, so keep long IDs as text there as well.

Quoting, separators and opening it in a spreadsheet

CSV has one escaping rule, set out in RFC 4180: a value that contains the separator, a double quote or a line break is wrapped in double quotes, and each double quote inside it is doubled. Octoolo quotes every value that contains a comma, semicolon, tab, quote or line break, whichever separator you chose, so He said "hi", then left is written as "He said ""hi"", then left".

SeparatorPick it when
CommaThe standard: databases, scripts, Google Sheets, and Excel in the US and UK
SemicolonExcel in countries that write decimals with a comma, such as Germany, France or Brazil, where Excel expects ; between values
TabPasting straight into a spreadsheet, where each value lands in its own cell

To work with the result as a spreadsheet, save it as a .csv file and open it in Octoolo's Spreadsheets, which guesses the separator, reads UTF-8 and turns numbers and dates into real values. From there, save it as an .xlsx workbook.

Keeping exports private, and PowerShell's way

JSON headed for a spreadsheet is usually real data: customers from a CRM, orders from a shop's API, users from a database. Converting it in an app on your PC, with no website involved, keeps that data where it already is.

Windows has a built-in route as well. In PowerShell, (Get-Content data.json -Raw | ConvertFrom-Json) | Export-Csv data.csv -NoTypeInformation writes a CSV file directly and works well for flat data. Two differences are worth knowing. Export-Csv takes its columns from the first object only, so keys that appear only in later objects are dropped. And nested values come out as PowerShell's own text, such as @{city=Oslo} or System.Object[], rather than JSON. Octoolo's converter collects every key and keeps nested values as JSON.

Questions, answered

What JSON shape does it expect?

An array of objects, the shape most APIs and databases export. A single object also works, as one row. If your array sits inside a wrapper like {"data": [...]}, paste just the array.

Why are some cells empty?

That object had no such key, or its value was null. Columns come from keys found anywhere in the data, so rows that lack a field get a blank cell.

Will Excel open the file correctly?

Usually. If every value lands in one column, Excel expected another separator: use Semicolon where Excel writes decimals with a comma. If accented letters look garbled, import the file through Excel's Data tab (From Text/CSV) and choose UTF-8, or open it in Octoolo's Spreadsheets.

Does it change my JSON?

No. The input stays as you pasted it, and the CSV is a new text in the Result pane. Nothing is saved until you copy it somewhere.

Can I convert the CSV back to JSON?

Yes: switch Direction to CSV → JSON in the same tool. The CSV to JSON page explains what comes out on that side.

JSON to CSV, and 16 more apps.

Download for Windows

7 days free, then from $3.99 a month for all 17 apps. Windows 10 and 11.