Json To Csv LogoJson To Csv

Can You Convert JSON to CSV? Yes — What to Know Before You Do (2026 Guide)

Yes — JSON converts to CSV whenever the data can be laid out as rows and columns. Flat record lists convert perfectly; nested objects get flattened into dot-notation columns. Here is what changes, what stays the same, and the free ways to do it.

Updated: 2026-10-069 min read

The short version: yes, with one condition

Yes — you can convert JSON to CSV. The one condition is structural: a CSV file is a flat grid of rows and columns, so your JSON has to be expressible that way. Most real-world JSON already is. APIs, data exports, and logs overwhelmingly return either a list of records (an array of objects) or a single record (one object), and both map onto a spreadsheet naturally: one object per row, one key per column.

Where people get stuck is not the conversion itself but the shape of their data. JSON allows nesting — objects inside objects, lists inside objects — while CSV has no notion of nesting at all. So the question behind "can you convert JSON to CSV?" is usually one of three smaller questions: will my nested data survive, will anything be lost, and do I need special software? The answers are yes with flattening, almost nothing if you are careful, and no — a free browser tool is enough for most files.

What CSV requires, and what JSON gives you

A CSV file is deliberately simple: the first row names the columns, every following row holds values in the same order, and that is the entire format. There are no data types (everything is text), no nesting, no comments, no formulas. JSON is far more flexible: values can be strings, numbers, booleans, null, objects, or arrays, nested as deeply as you like.

That mismatch is the whole story of this conversion. Turning JSON into CSV means deciding, for every piece of the JSON document, which row and column it belongs in. For the common shapes the mapping is obvious:

  • Array of flat objects becomes one row per object and one column per key. This is the perfect case.
  • A single flat object becomes one row under a header row. Trivial.
  • An array of plain values like ["a", "b"] becomes a single column with one value per row.
  • Nested objects, or arrays containing objects, need flattening first — covered in the next section.

If your JSON is the first kind — and if it came from an API response, it probably is — conversion is a one-click job with nothing to think about. The rest of this guide is for everything else.

When JSON converts to CSV perfectly

The ideal input looks like this: a JSON array where every object has the same flat keys. Each object becomes a row, each key becomes a column header, and nothing is invented, guessed, or discarded.

JSON
[
  {"name": "Ana", "email": "ana@example.com", "plan": "pro"},
  {"name": "Bo", "email": "bo@example.com", "plan": "free"}
]

That becomes a CSV with the header row name,email,plan followed by two data rows — a lossless, reversible mapping. This is the shape our free converter handles in a single paste, and it is also the shape Excel Power Query and the Python snippet further down expect. If every object in your array has the same keys, you can stop reading and just convert.

Mild variations are still fine: if a few objects are missing a key, those rows simply get an empty cell in that column. Converters take the union of all keys across all objects, so ragged data degrades gracefully instead of failing.

The complication: nested objects and arrays

Real JSON is rarely perfectly flat. An order record might bury the customer inside customer.name and the totals inside pricing.total. CSV has no "inside", so converters flatten nesting into the column names using dot notation: customer.name becomes a column literally called customer.name, and the value sits in that column.

To show exactly what happens, we ran a nested order record through this site's own converter engine with its flattening option on (the default). The input had objects nested three levels deep — customer.contact.email, shipping.city, pricing.total — and the engine produced these columns:

  • A list of simple values, like ["red", "blue"], becomes a single cell with the values joined by a semicolon and space: red; blue.
  • A list of objects, like [{"a": 1}, {"a": 2}], cannot be spread across columns, so it is kept as compact JSON text inside one cell. No data is lost — it is just not exploded across the grid.
  • Empty arrays and empty objects become [] and {} instead of vanishing silently, so you can tell "empty" apart from "missing".
CSV output
orderId,customer.name,customer.contact.email,customer.contact.phone,shipping.address,shipping.city,shipping.state,shipping.zip,pricing.subtotal,pricing.tax,pricing.total,status
ORD-9821,Alex Rivera,alex.r@techcorp.com,+1-555-0192,742 Evergreen Terrace,Springfield,OR,97477,249.99,21.25,271.24,shipped

Every nested value found its column, and nothing was dropped. Two details of the flattening rules are worth knowing, because they affect lists:

What changes in the conversion (and what does not)

Conversion is faithful, but it is not invisible. Here is precisely what changes when JSON becomes CSV:

  • Types become text. 42, true, and "2026-10-06" all land in the CSV as characters. Spreadsheets usually re-detect numbers and dates on import, but the CSV itself carries no type information — a zip code like 07477 can lose its leading zero if the spreadsheet guesses "number". Format the column as text on import when that matters.
  • null becomes an empty cell. A missing key behaves the same way: if one object in a hundred lacks an email address, that row simply has a blank in the email column.
  • Key order becomes column order. JSON objects are unordered by specification; converters use first-seen order, so columns follow the order in which keys first appear in your data.
  • Encoding stays UTF-8. If accented characters turn into gibberish in Excel, the file was read as ANSI instead of UTF-8 — re-import it and set the file origin to 65001: UTF-8.
  • The delimiter is configurable. Comma is the default, but if your locale's Excel expects semicolons, export with a semicolon delimiter instead of fighting the import.

What does not change: the values themselves, the number of records, and — with flattening on — the full nested structure, reorganized into dotted columns. One habit is still worth keeping: archive the original JSON. CSV is a one-way simplification, and converting back will not restore the data types.

Can you convert JSON to CSV for free?

Yes — this is a solved, commoditized task and you should not pay for it. Free online converters handle the common cases in seconds: paste your JSON or drop a .json file, then download the CSV. Ours is free with no account, runs entirely in your browser, and lets you toggle flattening, the delimiter, and headers before you download.

Open the free JSON to CSV converter

Can you do it without uploading your file anywhere?

Yes — and for sensitive data you should insist on it. There are two kinds of online converters. Server-side converters upload your file, convert it on somebody else's machine, and hand back a download link. Client-side converters run the whole conversion as JavaScript in your own browser tab, so the data never leaves your device.

This site's converter is the second kind: paste or drop a file and the CSV is generated locally on your machine. (The only network request it ever makes is when you explicitly ask it to fetch JSON from a URL you paste in.) As a rule of thumb, if your JSON contains API keys, customer emails, or anything you would not email to a stranger, use a client-side converter, your editor, or a local script — never a tool that uploads first and converts second.

How can you tell which kind a tool is? Open it, paste some data, and watch your browser's network tab while it converts — or simpler, disconnect from the network after the page loads. A client-side converter keeps working offline.

Can Excel or Google Sheets do it?

Excel can, natively, and it is the best option when the spreadsheet is your final destination anyway. Go to Data, then Get Data, then From File, then From JSON, and pick your file. Power Query shows the records as a table; expand any nested columns with the expand icon in the column header, then Close & Load and save as CSV. Nested data is handled visually instead of with dot notation, which some people prefer.

Google Sheets cannot import JSON natively — there is no File, Import option for .json files. Your realistic options are converting to CSV first with a free tool and then using File, Import, or running a small Apps Script that fetches and parses the JSON. For most people, converting first is faster than scripting Sheets.

One Excel-specific gotcha worth knowing: if everything lands in a single column, your Excel probably expects semicolons as the delimiter (common in European locales). Re-export the CSV with a semicolon delimiter rather than fighting the import wizard.

Can you convert it with code instead?

If you convert the same shape of JSON on a schedule — a daily export, a build step, a data pipeline — a short Python script beats clicking through a tool every time. This is the snippet data teams reach for: it flattens nested objects into dot-notation columns and writes a BOM so Excel detects the UTF-8 encoding automatically.

Python
import pandas as pd

# Flat or list-of-objects JSON
df = pd.read_json("data.json")

# Nested objects? Flatten them to dot-notation columns first
df = pd.json_normalize(df.to_dict("records"))

# utf-8-sig adds a BOM so Excel detects the encoding correctly
df.to_csv("data.csv", index=False, encoding="utf-8-sig")

For one-off terminal work, jq converts without Python at all. This command reads data.json, picks two fields per object, and prints CSV rows straight to stdout — handy for logs and API responses you are already piping around:

A one-line terminal alternative

The jq command below was tested on this machine: it takes an array of objects, joins each object's tags with "; ", and emits proper CSV with quoting handled for you.

Terminal
$ echo '[{"name":"Ana","tags":["x","y"]}]' | jq -r '.[] | [.name, (.tags|join("; "))] | @csv'
"Ana","x; y"

The @csv filter is the part doing the real work: it quotes fields that need quoting and escapes embedded quotes per RFC 4180, so you do not have to think about edge cases.

What about very large JSON files?

Yes, but not in a browser tab. Browser-based converters comfortably handle files up to a few megabytes; past that, tabs slow down or freeze because the whole document lives in memory at once. For large files, convert locally instead:

  • Python with pandas streams through hundreds of megabytes on an ordinary laptop — the snippet above works unchanged.
  • jq processes JSON as a stream and never needs the whole file in memory for simple field projections.
  • For truly huge files (gigabytes), split the input first — one JSON object per line processes line by line — or load it into SQLite or DuckDB and export CSV from there.

Whatever the size, validate the JSON before converting. Converters reject invalid JSON outright, and finding the syntax error in a 2 GB file is far easier with a streaming validator than by trial and error.

Which method should you pick?

Every method above produces the same CSV for the same input — the difference is convenience, privacy, and scale. Match your situation to a row:

  • One-off file, a few megabytes or less: a free online converter. Fastest by far.
  • Sensitive data: a client-side converter or a local script, so nothing is uploaded.
  • The same conversion on a schedule: a Python script you can rerun and version-control.
  • A huge file: local tools — Python, jq, or DuckDB — never a browser tab.
  • The spreadsheet is the final destination: Excel Power Query, skipping the middleman.

And if you only needed the answer to the title question: yes, you can convert JSON to CSV. Find your row above and you will be done in minutes.

Related guides

Is it possible to convert any JSON file to CSV?

Almost. Any JSON that can be expressed as rows and columns converts cleanly, and nested structures are flattened into dot-notation columns first. The only awkward input is a document with no record structure at all — say, one deeply nested object with no arrays — which still converts but produces a wide, sparse table. Usable, just not pretty.

Will I lose data converting JSON to CSV?

Values survive; types do not. Numbers, booleans, and dates become plain text, nulls become empty cells, and nesting is reorganized into flattened columns. A good converter never silently drops anything — but keep the original JSON file, because converting the CSV back will not restore the original data types.

Can I convert JSON to CSV without installing anything?

Yes. A free online converter does it right in your browser with no install and no account — paste the JSON, download the CSV. If you already have Excel, Data > Get Data > From JSON converts natively without any extra software.

Is it safe to paste my JSON into an online converter?

It depends on where the conversion happens. Client-side converters, like this site's, run everything in your browser tab, so your data never leaves your device — safe even for sensitive files. Avoid tools that upload your file to a server first, especially when the data contains personal information or secrets.

Why does my converted CSV look broken in Excel?

Two usual suspects: encoding and delimiter. If accented characters show as gibberish, the file was read as ANSI instead of UTF-8 — re-import it and set the file origin to 65001: UTF-8. If everything lands in one column, your Excel expects semicolons (common in European locales) — re-export with a semicolon delimiter.

Can I convert the CSV back to JSON afterwards?

Yes, CSV to JSON is the reverse trip and just as easy — see our guide "How to Convert CSV to JSON" for the three reliable methods. One caveat: it will not be identical to the original. Flattened dot-notation columns stay flat unless you un-flatten them, and every value comes back as a string.

How long does converting JSON to CSV take?

Milliseconds for typical files: paste, download, done. Time only becomes a factor with very large files in the hundreds of megabytes, where a browser tab may struggle and a local script is the faster, safer choice.

Ready to convert your JSON?

Paste your JSON and download a clean, spreadsheet-ready CSV in seconds — free, private, no sign-up.

Open the JSON to CSV converter
All guides