JSON to CSV Converter - Turn JSON into CSV Online (Free)

Convert JSON to CSV online free. Paste JSON, get spreadsheet-ready CSV for Excel or Sheets. Runs in your browser - no upload, no sign-up.

Tool options

Mode

Delimiter

Nested objects

Input
303 chars · 1 lines · 303 bytes
Output

Turn JSON into a spreadsheet in one click

Paste your JSON, hit convert, and get clean CSV you can open in Excel, Google Sheets, or Numbers right away. No setup, no sign-up, and your data never leaves your browser.

This is handy when an API or a config file hands you JSON (a list of records with names and values) but you actually need rows and columns - for a report, an import, or just to read it without squinting.

How to use it

  1. Paste your JSON into the input box, or drag in a .json file.
  2. Click Convert.
  3. Check the CSV preview on the right.
  4. Copy it, or download it as a .csv file.
  5. Open the file in Excel or Google Sheets.

For the cleanest result, give it an array of objects (a list where each item has the same keys). Each object becomes one row, and each key becomes a column heading.

Worked example

Say you have this JSON, a list of two users:

[
  { "id": 1, "name": "Ada Lovelace", "city": "London" },
  { "id": 2, "name": "Alan Turing", "city": "Manchester" }
]

The converter turns it into this CSV:

id,name,city
1,Ada Lovelace,London
2,Alan Turing,Manchester

The keys (id, name, city) become the header row. Each object becomes a data row underneath. If a value contains a comma, a quote, or a line break, it gets wrapped in double quotes so the file stays valid - this follows the CSV rules in RFC 4180.

How to do this in code

If you would rather script it, here are short, runnable versions.

Python (uses the built-in csv and json modules):

import csv, json

data = json.load(open('data.json'))
with open('data.csv', 'w', newline='') as f:
    writer = csv.DictWriter(f, fieldnames=data[0].keys())
    writer.writeheader()
    writer.writerows(data)

JavaScript (Node.js, no libraries):

const data = require('./data.json');
const headers = Object.keys(data[0]);
const rows = data.map(o => headers.map(h => JSON.stringify(o[h] ?? '')).join(','));
const csv = [headers.join(','), ...rows].join('\n');
console.log(csv);

The browser tool above handles the tricky parts for you (quoting, nested data, missing keys), so you do not have to write or debug this yourself.

How it works

The tool reads your JSON, finds every key across all the records, and uses those keys as column headers. Then it writes one row per record, filling in each cell and quoting any value that needs it. Nested objects and arrays get flattened where possible - for example, a key like address.city becomes its own column - so deep data still lands in a readable grid.

Everything runs inside your browser using JavaScript. Nothing is uploaded to a server, so private or sensitive data stays on your machine. You can confirm this by turning off your internet after the page loads - the converter still works.

When to use it (and when not to)

Reach for this when you have a list of similar records and you want them in a spreadsheet, a database import, or a quick report. It shines on API responses, exported logs, and product or contact lists.

It is not the right fit for deeply nested JSON with no clear table shape - a single big object with objects inside objects inside arrays won't flatten neatly into rows. In that case, keep working in JSON. You might want a JSON Viewer - View, Format & Validate JSON Online (Free) to explore the structure, or convert to JSON to YAML Converter - Convert JSON to YAML Online (Free) if you need a config-friendly format instead. If your JSON looks broken, run it through the JSON Validator - Check & Fix JSON Errors Online (Free) first, then come back here.

Need the other direction or some cleanup? Tidy up messy input with the JSON Beautifier - Format, Validate & Minify JSON Online or the JSON Pretty Print - Format & Beautify JSON Online (Free), and shrink files for transfer with the JSON Minifier - Compress & Minify JSON Online (Free).

Frequently asked questions

How do I convert JSON to CSV in Python?+
Use the built-in modules: read the file with json.load(), then write rows with csv.DictWriter using the first record's keys as the header. No extra packages needed. There is a copy-paste example in the section above.
How do I convert JSON to CSV in JavaScript?+
Grab the keys with Object.keys(data[0]) for the header, then map each object to a comma-joined row. For tricky data with quotes or commas, the browser tool here handles the escaping for you.
Is my data uploaded or stored anywhere?+
No. The conversion runs entirely in your browser with JavaScript, so your JSON never leaves your device. It is safe for private or sensitive data.
Is this JSON to CSV converter free? Do I need to sign up?+
It is completely free with no account, no email, and no limits on how many times you use it.
Can it handle nested JSON objects?+
Yes, to a point. Nested keys get flattened into columns like address.city. Very deep or irregular structures may not map cleanly to a flat table - JSON or YAML is a better fit for those.
Will Excel open the CSV correctly?+
Yes. The output follows the standard CSV format (RFC 4180), with values quoted when they contain commas, quotes, or line breaks, so Excel, Google Sheets, and Numbers all read it without errors.
Can it convert large JSON files?+
It handles big files well since it runs locally with no upload step. Performance depends on your device's memory, but most exports of a few thousand records convert instantly.
What if my JSON is invalid?+
The converter needs valid JSON to work. If you get an error, run your text through a JSON validator first to find the missing comma or bracket, then convert.