Skip to content
QueenNexa

Free tool

JSON to CSV & CSV to JSON Converter

Convert JSON to CSV or CSV to JSON with nested-object flattening, any delimiter and correct RFC 4180 quoting. Large files are handled in your browser.

JSON to CSV options

Runs entirely in your browser. Nothing you type or upload is sent to our servers.

How to convert JSON to CSV

  1. Paste JSON, usually an array of objects, or open a .json file. A single object becomes one row, and a wrapper like {"data":[...]} is unwrapped automatically.
  2. Choose a delimiter and how nested values should be handled.
  3. Copy the CSV or download it. For the other direction, switch to CSV to JSON.

Worked example: JSON to CSV

This JSON has a nested object, an array, a comma in a name, and a quote in a note:

[{"id":1,"name":"Ann Lee","address":{"city":"Austin","zip":"02134"},"tags":["a","b"]},{"id":2,"name":"Bob, Jr.","address":{"city":"Reno"},"note":"He said \"hi\""}]

With flattening on, the CSV has one column for every path that appears in any object. Bob has no tags, so those cells are empty, and values that need it are quoted and have their quotes doubled:

id,name,address.city,address.zip,tags.0,tags.1,note
1,Ann Lee,Austin,02134,a,b,
2,"Bob, Jr.",Reno,,,,"He said ""hi"""

With Keep as JSON text, nested values stay in one cell instead, which keeps the column count fixed:

id,name,address,tags,note
1,Ann Lee,"{""city"":""Austin"",""zip"":""02134""}","[""a"",""b""]",
2,"Bob, Jr.","{""city"":""Reno""}",,"He said ""hi"""

Worked example: CSV to JSON

This CSV has a quoted value with a comma, a number, a boolean, an empty cell and a dotted header:

id,name,active,score,user.city
1,"Lee, Ann",true,9.5,Austin
2,Bob,false,,Reno

With type detection and Rebuild nested objects on, it becomes the following. The empty score is null, 9.5 is a number, and user.city is rebuilt as a nested object:

[
  {
    "id": 1,
    "name": "Lee, Ann",
    "active": true,
    "score": 9.5,
    "user": {
      "city": "Austin"
    }
  },
  {
    "id": 2,
    "name": "Bob",
    "active": false,
    "score": null,
    "user": {
      "city": "Reno"
    }
  }
]

Rules the converter follows

  • RFC 4180 quoting. Fields with the delimiter, a double quote or a line break are quoted, and embedded quotes are doubled.
  • No silent data changes. Leading zeros (02134) and integers beyond 9,007,199,254,740,991 stay text when converting to JSON. Large integers in JSON input trigger a precision warning.
  • Safe limits. Up to 5,000,000 characters, 100,000 rows and 1,000 columns, with clear errors beyond that.
  • Errors with positions. Invalid JSON is reported with the line and column of the first problem, and an unclosed quote in a CSV is reported by line.

Need to check or tidy the JSON first? Use the JSON formatter and validator. To see what changed between two exports, use Text Compare.

Frequently asked questions

Is my data uploaded?

No. The conversion runs in your browser with JavaScript, and nothing is sent to a server or stored. That is why it is safe to use with customer lists, API responses and internal exports. The page works even if you go offline after it has loaded.

How are nested objects and arrays turned into columns?

By default they are flattened with dot paths: {"address":{"city":"Austin"}} becomes a column named address.city, and an array such as tags becomes tags.0, tags.1 and so on. You can change the separator, or choose to keep each nested value as JSON text in a single cell, which keeps the column count small.

How does it handle commas, quotes and line breaks in values?

It follows RFC 4180. A field containing the delimiter, a double quote or a line break is wrapped in double quotes, and any double quote inside it is doubled. The output opens correctly in Excel, Google Sheets and LibreOffice, and the CSV to JSON direction reads quoted fields, escaped quotes and multi-line cells back correctly.

Why do my ZIP codes and IDs keep their leading zeros?

When converting CSV to JSON with type detection, only plain numbers become JSON numbers. A value such as 02134, or an integer too large for JavaScript to store exactly, stays a string, because turning it into a number would silently change it. You can also switch type detection off to keep every value as text.

What if different objects have different keys?

The CSV gets one column for every key that appears in any object, in the order first seen, and a row leaves the cell empty when it has no value for that key. Empty cells and JSON null both become empty fields. The page shows the column count so surprises are easy to spot.

Which delimiter should I choose?

Use comma for most tools and English-language spreadsheets. Many European versions of Excel expect a semicolon because they use the comma as a decimal mark. Choose tab for pasting straight into a sheet, and pipe when your values contain many commas. CSV to JSON detects the delimiter automatically unless you pick one.

Can a spreadsheet run formulas hidden in my data?

It can. Spreadsheets treat cells that begin with =, +, - or @ as formulas, which is a known risk called CSV injection when data comes from untrusted users. Turn on Protect against spreadsheet formulas to add a leading apostrophe to such text cells. Real numbers, including negative ones, are left unchanged.

Are there size limits?

Input up to 5,000,000 characters, 100,000 rows and 1,000 columns is accepted, which covers most exports and keeps your browser responsive. Larger files are rejected with a clear message instead of freezing the tab. Split very large files into parts, or use a command-line tool for them.

Link to this tool

Found it useful? Copy a link for your page, newsletter or documentation.

Get new tools and guides by email

Optional. The tool above works without signing up.

One email every Tuesday. Free, and you can unsubscribe in one click.

More free tools

Browse all developer tools or the full list of free tools.