JSON to CSV Converter
Paste JSON or JSON Lines, or open a file, to get a CSV with one row per object. The conversion runs entirely in your browser, so your data is never uploaded.
Swap to CSV to JSONPaste text, or drop a file here
Example
JSON input
[
{ "id": 1, "name": "Ada", "address": { "city": "London" }, "tags": ["math", "code"] },
{ "id": 2, "name": "Grace", "address": { "city": "New York" }, "active": true }
]CSV
id,name,address.city,tags.0,tags.1,active
1,Ada,London,math,code,
2,Grace,New York,,,trueHow it handles tricky cases
Nested objects
With flattening on, nested keys become dotted columns such as address.city, and arrays use positions such as tags.0. Turn it off to keep each nested value as JSON text in one cell.
Objects with different keys
Columns are the union of every key in the file, in the order they first appear. A row that lacks a key gets an empty cell.
JSON Lines and NDJSON
Files with one JSON value per line, common in logs and data exports, are detected automatically and become one row per line. If a line is broken, the error names its line number.
Very long integers
IDs longer than about 16 digits can't be held exactly as JavaScript numbers. This tool keeps them as written, and shows a note when it does.
Accents in Excel
Excel can misread UTF-8 CSV files as another encoding. Turning on the BOM option adds a marker that tells it the file is UTF-8.
Formula injection
A cell beginning with =, +, - or @ can run as a formula when the CSV is opened in a spreadsheet. If the data comes from people you don't trust, turn on formula escaping.
Do it from code
Python with pandas:
import json
import pandas as pd
with open("in.json", encoding="utf-8") as f:
data = json.load(f)
pd.json_normalize(data).to_csv("out.csv", index=False)
Questions
Is my JSON uploaded anywhere?
No. The page's code does the conversion on your device, and the site's security policy blocks the page from sending data out.
What JSON shapes can be converted?
An array of objects or a JSON Lines file works best. A single object becomes one row, an array of arrays becomes rows with no header, and an array of plain values becomes one column named value.
How do I convert a CSV back to JSON?
Use the CSV to JSON page. Column names with dots can be rebuilt into nested objects with its nesting option.