FormatDrop
How-To Guide

How to Convert JSON to CSV

JSON is the standard format for APIs and web data; CSV is the standard format for spreadsheets and databases. Converting JSON to CSV makes your API data importable into Excel, Pandas, PostgreSQL, or any BI tool. The conversion flattens the hierarchical JSON structure into rows and columns.

Step-by-step instructions

  1. 1

    Upload or paste your JSON file

    Provide a JSON file containing an array of objects (the most common API output format). Each object becomes a row in the CSV; each key becomes a column header. Nested objects are either flattened or stringified depending on the tool.

    Go to converter
  2. 2

    Select CSV as output format

    Choose CSV. The converter maps the JSON keys to column headers and each object's values to the corresponding row. If your JSON has inconsistent keys across objects, missing values are filled with empty cells.

  3. 3

    Download and import the CSV

    Open in Excel, import into your database, or load with Pandas. If the CSV looks wrong (garbled nested objects), you may need to preprocess the JSON to flatten it first.

Why convert JSON to CSV?

JSON describes structure; CSV describes data. The conversion is a declaration of intent: you've finished exploring the API and are ready to analyze the data. Everything downstream from that decision speaks CSV.

Your files never leave your device

FormatDrop runs the conversion engine entirely inside your browser using WebAssembly. No file upload. No server. Nothing stored. You can verify this by opening DevTools → Network tab and watching: zero upload requests.

Frequently asked questions

How do I convert JSON to CSV with Python?
`import json, csv; data=json.load(open('input.json')); writer=csv.DictWriter(open('out.csv','w'), fieldnames=data[0].keys()); writer.writeheader(); writer.writerows(data)`. For nested JSON, use pandas: `import pandas as pd; pd.json_normalize(data).to_csv('out.csv', index=False)`.
How do I handle nested JSON objects in CSV conversion?
Pandas json_normalize() flattens nested objects: `pd.json_normalize(data, max_level=2)`. Deeply nested JSON (more than 2–3 levels) should be reshaped in Python before conversion — decide which nested fields you need and extract them explicitly.
Can jq convert JSON to CSV?
Yes: `jq -r '(.[0] | keys_unsorted) as $keys | $keys, map([.[$keys[]]] | @csv)[] | @tsv' input.json > output.tsv`. This creates a tab-separated file. For proper CSV: pipe through `sed 's/\t/,/g'` or adapt the jq filter.
Convert JSON to CSV Now — Free

No account. No upload. Works in any browser.