← All tools

JSON ↔ CSV Converter

Convert JSON to CSV with nested objects as columns, or CSV back to JSON with real numbers, in your browser.

Free tool No account
Input
Output

✓ 2 rows · 5 columns

Ready163 in · 88 outProcessed locally · No upload
Enjoying JSON ↔ CSV Converter?Your review and ideas shape what we build next.

Review JSON ↔ CSV Converter

Please don't include file contents or passwords.

About the JSON ↔ CSV Converter

Turn a JSON array into a CSV file you can open in Excel or Google Sheets, or a CSV file back into clean JSON. Nested objects become columns like address.city and turn back into objects; quotes, commas and line breaks inside values are handled properly, and the separator (comma, semicolon, tab or pipe) is detected for you.

How to use it

  1. Choose JSON → CSV or CSV → JSON.
  2. Paste your data. The result appears on the right with the number of rows and columns.
  3. Adjust the options: separator, nested objects as columns, Excel-safe cells, typed values.
  4. Copy or download the result. Switching direction moves the result to the input, so you can convert straight back.

Tip: Paste an API response as it is. When the JSON is an object holding a list, such as {"data": [...], "total": 2}, the tool finds the list and tells you which one it used.

How JSON becomes a table

A list of objects
Each object is a row and each key a column. Keys that appear only in some rows still get a column; the other rows leave it empty.
Nested objects
{"address": {"city": "Paris"}} becomes a column called address.city. Untick nested → columns to keep the object as JSON text in one cell.
Lists inside a row
["a", "b"] is written as JSON text in one cell, so nothing is lost.
A list of plain values
["x", "y"] becomes one column called value.
A list of lists
[["id", "name"], [1, "A"]] is already rows, so each inner list is written as a row.
null, true and false
null becomes an empty cell; true and false are written as words.

How CSV becomes JSON

Header row
The first row gives the key names. Blank names become Column 3 and repeated names get _2, so no data is overwritten.
Typed values
With numbers & true/false ticked, 42 becomes a number, TRUE becomes true and empty cells become null. Untick it to keep every value as text.
Leading zeros and long IDs
Values like 02134 (ZIP codes) and numbers longer than 15 digits stay text, because a JSON number would lose the zero or the last digits.
a.b columns
With a.b columns → nested ticked, address.city becomes {"address": {"city": …}}, the reverse of JSON → CSV.
Quotes and line breaks
"Sam, Jr" stays one value, "" inside quotes is one quote, and a quoted value can span several lines.

Opening the CSV in Excel

In many European countries Excel expects semicolons, because the comma is the decimal separator. If everything lands in column A, choose Semicolon as the separator and download again. The file uses Windows line endings (CRLF), which every spreadsheet reads.

Tick Excel-safe when the data comes from users or the web. A cell that starts with =, +, - or @ can run as a formula when the file is opened (CSV injection); Excel-safe puts a ' in front so it shows as text. Ordinary numbers like -5 aren't changed.

Common problems and fixes

“Not valid JSON: line 1, column 10”
The message says where it stopped and what's likely wrong, such as a trailing comma or a missing quote. Fix it there, or use the JSON Formatter's fix button.
Columns shifted in the CSV
A value with a comma wasn't quoted in the source file. Quote it ("Paris, France") or use another separator.
Strange characters (é)
The file was saved in another encoding. Open it in a text editor and save as UTF-8.

When to use CSV and when to use JSON

CSV is a flat table: perfect for spreadsheets, databases, imports into mailing tools and sharing data with people who don't code. JSON keeps structure, such as nested objects, lists and real numbers and true/false, and is what web APIs and JavaScript apps use. Convert to CSV when someone needs to read, sort or filter the data; convert to JSON when code needs to use it.

Tips and tricks

Big files

Everything runs in your browser, so tens of thousands of rows convert in moments without uploading anything.

Tab-separated data

Paste straight from a spreadsheet: copied cells are tab-separated and the tool detects it.

Keep column order

Columns follow the order keys first appear, so put the most important keys first in the first object.

Indentation

In CSV → JSON, choose 2 or 4 spaces or a tab for the JSON output.

Questions

How do I convert JSON to CSV for Excel?

Paste the JSON, choose JSON → CSV, pick Semicolon if your Excel uses commas for decimals, and download the file. Open it in Excel by double-clicking or with Data → From Text/CSV.

Can it handle nested JSON?

Yes. Nested objects become dot-named columns such as user.address.city, and lists are kept as JSON text in a cell. CSV → JSON turns the dot names back into objects.

Why are my numbers in quotes in the JSON?

Untick numbers & true/false and everything stays text; tick it to get real numbers. Values with leading zeros always stay text so they aren't changed.

Does it detect semicolons and tabs?

Yes. In CSV → JSON the separator is detected from the first lines; you can also choose it yourself.

Can I convert CSV with semicolons to JSON?

Yes. The separator is detected automatically, and you can also choose Semicolon, Tab or Pipe yourself.

Is anything I type uploaded?

No. The tool runs in your browser; what you type or paste never leaves your device and nothing is stored on a server.

Related tools

Updated