JSON to CSV converter
Turn a JSON file into a CSV. Nested fields become their own columns, and your file never leaves your browser.
Drop a JSON file here
JSON or JSON Lines, up to 100 MB. It stays on your computer.
- No sign-up
- Nothing uploaded
- Comma, semicolon or tab
A CSV that opens cleanly, made on your computer.
Your file stays on your computer
The CSV is written in your browser. Nothing is sent to Mammoth or anyone else.
Nested fields become columns
A field like customer.name gets its own column instead of a block of JSON text.
Commas stay inside their cell
A value like web, repeat is quoted, so it doesn't split into two columns.
How to convert JSON to CSV
The converter finds the list of records, writes one line per record, and gives every field a column.
- 1
Add your JSON
Drop a .json file on the box, choose one, or paste the JSON in.
- 2
Check the rows
A preview shows the columns and the first rows of your CSV.
- 3
Download
Pick a separator and save the CSV, or take an Excel file instead.
Other ways to do it
If you write code, a few lines will do it too.
Python with pandas
A job you script once
- Expands nested fieldsYes
- Quotes values that contain commasYes
- No code or installNo
- Runs on a scheduleYes
Copy and paste
A handful of flat records
- Expands nested fieldsNo
- Quotes values that contain commasNo
- No code or installYes
- Runs on a scheduleNo
- This page
This converter
One-off files, no setup
- Expands nested fieldsYes
- Quotes values that contain commasYes
- No code or installYes
- Runs on a scheduleNo
How to convert JSON to CSV in Python
If you write code, pandas does it in a few lines. For a quick job on the command line, jq works too.
Want it in Excel instead? Excel can open JSON with Power Query and save it as CSV. The steps are on the JSON to Excel page.
import json
import pandas as pd
with open("orders.json") as f:
data = json.load(f)
pd.json_normalize(data["data"]).to_csv("orders.csv", index=False)json_normalize gives nested fields dotted column names, the same as this converter.
jq -r '.data[] | [.id, .customer.name, .total] | @csv' orders.json > orders.csv
jq writes only the fields you list, and no header row.
Your file stays private
The converter runs inside this page. Your JSON is read and written out as CSV on your computer, and nothing is sent to Mammoth. That makes it safe for API exports with customer data in them.
Once the page has loaded, it works with your internet switched off.
Turning the same JSON into CSV every month?
Mammoth can do it for you. Put the JSON files in a folder and their records are added to one table, ready to export as CSV.
Region exports
| North | Oct 01 | Leeds store | 4,120.00 | |
| South | Oct 01 | Bristol store | 3,875.50 | |
| West | Oct 01 | Cardiff store | 2,940.25 | |
| North | Nov 01 | Leeds store | 4,388.10 | |
| South | Nov 01 | Bristol store | 3,702.00 |
Illustration. Every new file in the folder is added to the same table.