We use cookies

We use cookies and similar technologies to enhance your browsing experience, analyze site traffic, and personalize content and ads. By clicking "Accept", you consent to our use of cookies. Learn more in our Privacy Policy.

Free · in your browser · no signup

JSON to CSV Converter

Convert a JSON array of objects to CSV (or CSV back to JSON) in one click — handles nested values and quoting, all in your browser.

This is a free converter that turns a JSON array of objects into CSV, and CSV back into JSON, directly in your browser. Paste your data, pick a direction, and get clean output you can copy or download. It handles the parts people usually get wrong by hand: quoting fields that contain commas, escaping embedded quotes, and producing a stable column order so the result opens correctly in spreadsheet software.

It is built for the everyday task of moving data between an API response and a spreadsheet. JSON is what services return; CSV is what spreadsheets, BI tools, and many data pipelines expect. Doing the conversion by find-and-replace is error-prone, and pasting sensitive data into a random web service is a real concern. Here the conversion runs entirely on your device, so nothing you paste is uploaded or stored on a server. It works the same whether you have ten rows or several thousand.

How it works

Paste or type your data into the input box and choose the direction: JSON to CSV or CSV to JSON. The tool parses the input, builds the result, and shows it instantly so you can verify the output before copying.

For JSON to CSV, the input should be an array of objects, like [{"id":1,"name":"Ada"},{"id":2,"name":"Linus"}]. The converter scans every object to collect the full set of keys, writes them as the header row, and fills missing values with empty cells so every row has the same number of columns.

For CSV to JSON, the first row is treated as the header and each following row becomes one object keyed by those headers. Quoted fields, escaped quotes (""), and values containing commas or line breaks are parsed correctly rather than split blindly on every comma.

Use the copy button for clipboard, or download to save a .csv or .json file. Everything happens locally in the page.

A worked example

Say an API returns this:

[
  {"id": 1, "name": "Ada Lovelace", "note": "first, programmer"},
  {"id": 2, "name": "Grace Hopper", "note": "said \"bug\""}
]

Converting to CSV produces:

id,name,note
1,Ada Lovelace,"first, programmer"
2,Grace Hopper,"said ""bug"""

Notice two things the tool does for you. The note value first, programmer is wrapped in quotes because it contains a comma, so a spreadsheet keeps it in one cell instead of splitting it into two columns. The value said "bug" is wrapped in quotes and each inner quote is doubled to "", which is how CSV escapes quotation marks. Round-tripping that CSV back through CSV to JSON gives you the original objects again, including the comma and the quotes intact.

Common use cases

  • API response into a spreadsheet — paste a JSON array from a fetch or a tool like an HTTP client, get a CSV you can open in your spreadsheet app.
  • Bulk imports — many admin panels, CRMs, and ad platforms accept CSV uploads but not JSON. Convert first, then upload.
  • Quick data inspection — a wide JSON array is hard to read; the column layout of CSV makes it easy to scan rows and spot outliers.
  • Going the other way — you exported a CSV report and need JSON to feed a script, a config file, or a test fixture.
  • Cleaning up exports — normalize an array where some objects are missing fields into a rectangular table with consistent columns.
  • Sharing a dataset — CSV is the lowest-common-denominator format almost every tool can read.

Tips and gotchas

  • Input must be an array of objects for JSON to CSV. A single object {"a":1} should be wrapped as [{"a":1}]. A bare value or an array of arrays will not map cleanly to columns.
  • Nested objects and arrays do not have a natural place in a flat table. A field like "address": {"city": "..."} is typically written as its JSON text inside one cell. If you need each nested field as its own column, flatten the JSON first (for example, turn address.city into a top-level key).
  • Inconsistent keys are fine — objects missing a field get an empty cell, and any key seen in any object becomes a column.
  • Numbers vs strings — CSV has no types, so everything becomes text. When converting back to JSON, values that look numeric may be read as numbers; if you need them as strings, account for that downstream.
  • Encoding — keep the file as UTF-8 so accented characters and symbols survive the round trip.

Why CSV quoting matters

CSV looks trivial until a value contains the very characters used to structure the file: the comma, the quote, and the newline. The widely followed convention (RFC 4180) handles this with two rules. First, any field that contains a comma, a double quote, or a line break must be enclosed in double quotes. Second, a double quote inside such a field is escaped by writing it twice.

That is why she said "hi" becomes "she said ""hi""" in the output. Skip these rules and a single comma in a description shifts every column after it, silently corrupting the row. A newline inside a quoted field is also valid and stays part of one cell.

This converter applies the rules in both directions, which is what makes the JSON to CSV to JSON round trip lossless for ordinary string data. When you read the output, the doubled quotes and wrapping quotes are not noise; they are the format working correctly.

Tips

  • Wrap a single object in square brackets (`[ ... ]`) before converting JSON to CSV.
  • Flatten nested objects to top-level keys if you want each sub-field in its own column.
  • Open the resulting CSV in a spreadsheet to confirm columns line up before sharing it.
  • Save as UTF-8 so non-ASCII characters survive the conversion.
  • Sensitive data stays on your machine, but still double-check the output before pasting it elsewhere.
  • If a CSV import fails elsewhere, check that the header row matches the column count of every data row.

How to use JSON to CSV Converter

  1. 1Paste a JSON array of objects (or CSV text).
  2. 2Click JSON → CSV, or CSV → JSON.
  3. 3The converted output replaces the input.
  4. 4Copy it — nothing is uploaded.

Frequently asked questions

What JSON shape does the converter expect?

An array of objects, such as `[{"id":1},{"id":2}]`. Each object becomes a row and its keys become columns. A single object should be wrapped in an array first.

How are nested objects and arrays handled?

A flat table has no column for nested data, so nested values are written as their JSON text inside a single cell. If you need them as separate columns, flatten the JSON before converting.

What happens if some objects are missing fields?

Every key found in any object becomes a column, and objects that lack a field get an empty cell. The output is always rectangular so it opens cleanly in a spreadsheet.

Does it handle commas and quotes inside values?

Yes. Fields containing commas, quotes, or line breaks are wrapped in double quotes, and inner quotes are doubled, following the standard CSV quoting rules in both directions.

Is the conversion lossless when I go JSON to CSV and back?

For ordinary string data, yes. The main caveat is types: CSV has no notion of number vs string, so a value may come back as a number after a round trip unless you handle it downstream.

Is my data uploaded anywhere?

No. Parsing and conversion run entirely in your browser on your device. Nothing you paste is sent to or stored on a server.

Which delimiter does the output use?

Standard comma-separated values with a header row. The result opens directly in common spreadsheet applications without extra import settings.

Is there a row limit?

There is no fixed cap. It comfortably handles small to large datasets; very large inputs are bound only by your browser's available memory since everything runs locally.

← All toolsRead our guides →