Skip to content

JSON to CSV

Flatten JSON records into a CSV you can open in a spreadsheet. Nothing is uploaded.

On your device

Drop JSON files here

Converted on your device. Files are never uploaded.

Up to 20 files at a time.

Options

CSV is what spreadsheets, databases and import tools understand, while APIs and apps hand you JSON. FormatJet finds the list of records in your JSON, flattens nested fields into dotted columns and writes a CSV with the separator you pick. It runs in your browser, so exports from your systems never leave your device.

About the formats

JSONJSON file

JSON is the text format web APIs and apps use to exchange data: objects, lists, text, numbers and true or false values, nested as deep as needed.

CSVCSV file

CSV stores a table as plain text, one row per line with commas between the values. Spreadsheets, databases and almost every data tool can read and write it.

Converted with Data converters (Papa Parse, yaml, fast-xml-parser), Data converters on Workers.

Questions

How is nested JSON turned into columns?

Fields inside nested objects get dotted column names such as address.city. A list of plain values goes into a single cell, joined with a semicolon and a space, and a list of objects is written into the cell as JSON text.

Which part of my JSON becomes the rows?

The longest list of records in the file. If your JSON wraps its records, as in {"data": [ … ]}, the list inside is used; a single object becomes one row.

Excel puts everything in one column. What should I do?

Spreadsheets set to use a comma in numbers expect semicolons between values. Choose Semicolon under “Separator” in Options and convert again.

In what order do the columns appear?

In the order each field is first seen in the records. A record without a particular field gets an empty cell in that column.

How are commas inside values handled?

Any value containing the separator or a quote mark is wrapped in quotes, so commas in addresses or descriptions don’t split a cell. Lines end in CRLF, as Windows software expects, and the text is UTF-8.

JSON to CSV with the API

The conversion API opens later this year.

curl https://api.formatjet.com/v1/convert?to=csv \
  -H "Authorization: Bearer fj_test_…" \
  -F file=@input.json -o output.csv