JSON TO CSV

Turn JSON into a table you can open, check, and export. Arrays of objects, arrays of arrays, JSON Lines, a single object, or an object wrapping one list are all accepted. Nested objects become dotted column names such as address.city, and the result can be exported as CSV or any other supported format.

Zero retention: your files never leave this browser. Verify it yourself in DevTools.

Loading the CSV tools.

About JSON to CSV converter

How Can You Verify That Your Files Never Leave This Browser?

You do not have to take our word for it. Browser developer tools list every request a page makes, so you can watch 2csv work and confirm that your data is never sent anywhere. The check takes about a minute.

  1. Open your browser developer tools with F12, or Cmd+Option+I on a Mac, and select the Network tab.
  2. Reload the page and let it finish. You will see the page's own files (including the background file parser), its web fonts, and one anonymous page-view request. No file has been chosen yet, so none of them can contain your data.
  3. Click the clear icon in the Network tab so that the log is empty.
  4. Open a JSON file in the JSON to CSV converter tool above, run it, and download the result.
  5. Look at the Network tab again. It is still empty. Reading, changing, and saving the file made no request at all. For extra proof, turn on offline mode after the page loads: every tool keeps working.

Your file is read into this tab's memory with the browser's own file reader, parsed and changed by code that is already on the page, and handed back to you as a download. It is never uploaded, never stored in the browser, and gone when you close the tab. The only other request the site can make is the feedback form, and only when you submit it.

The production site also sends a Content-Security-Policy header that tells your browser to refuse connections to anywhere except this site and the anonymous analytics endpoint, so even a bug could not send your data elsewhere.

Which JSON Shapes Are Accepted?

  • An array of objects, one row per object.
  • An array of arrays, one row per inner array.
  • JSON Lines, one object per line.
  • A single object, which becomes one row.
  • An object wrapping one list, such as a data key holding the records. The list is used, and the page says so.

Column order follows the order in which keys first appear across the records. Keys that are missing in some records give empty cells in those rows, so records with different fields still line up in one table.

How Are Nested Objects Flattened?

Flattening turns a nested object into separate columns whose names show the path. A record with an address object holding city and state becomes two columns, address.city and address.state. Arrays inside a record are different: they are kept as JSON text in a single cell, because spreading a list across columns would make rows of different lengths.

  1. Open the JSON and look at the column names.
  2. Rename dotted columns by double-clicking the header if you want shorter names.
  3. Use Split column if a cell of JSON text needs to be broken apart.

Can You Clean the Data Before Exporting?

Yes. Once the JSON is open it is a normal table, and every tool works on it: Sort CSV, Filter CSV, Remove duplicates, and the rest. The export bar then writes CSV with your choice of delimiter and line endings, or TSV, SQL, or JSON again in a different shape.

What Should You Watch For With JSON Exports?

API exports often have a few records with extra keys, and those keys become columns that are empty in most rows. Deeply nested data produces long dotted names. Very large JSON files need more memory than the same data as CSV, because the whole document is read before it becomes a table. Check the column list before exporting.

When the records are spread across several JSON or CSV files, such as one export per day, stack them into one file before converting. 2join combines them in the browser, and the result can be opened here and flattened in one step.

What Else Can You Do With a CSV Here?

  • CSV viewer: Open a CSV of any size, scroll every row, and see a profile of each column.
  • Sort CSV: Sort rows by one or more columns, as text, numbers, or dates, ascending or descending.
  • Filter CSV: Show only the rows that match an expression such as price > 10 AND state = "NY".
  • CSV validator: Find ragged rows, broken quotes, bad headers, encoding problems, and values of the wrong type.
  • Remove duplicates from CSV: Find and remove duplicate rows, comparing whole rows or only the columns you choose.
  • Trim CSV whitespace: Trim leading and trailing spaces, collapse double spaces, and drop invisible characters and empty rows.
  • Find and replace in CSV: Find text in one column or every column and replace it, with match case, whole cell, and regex options.
  • Remove rows from CSV: Delete rows by number or range, the first or last rows, empty rows, or rows that match a rule.
  • CSV editor: Edit cells, add or delete rows, and add, delete, rename, or move columns.
  • Split CSV column: Split one column into several at a delimiter, such as a full name into first and last.
  • Merge CSV columns: Join two or more columns into one with the separator you choose, skipping empty values.
  • CSV column type converter: Convert a column to clean numbers, ISO dates, true/false, or upper, lower, or title case.
  • CSV to JSON converter: Convert CSV to a JSON array of objects or arrays, or to JSON Lines, with typed values.
  • CSV to SQL converter: Turn a CSV into SQL INSERT statements, with an optional CREATE TABLE, for PostgreSQL, MySQL, SQLite, or SQL Server.
  • CSV to TSV converter: Convert a comma-separated file to tab-separated values that paste cleanly into spreadsheets.
  • TSV to CSV converter: Convert a tab-separated file to a standard, properly quoted comma-separated CSV.
  • CSV splitter: Split a large CSV into smaller files of a set number of rows, with the header repeated in each.

All eighteen tools are on the 2csv home page, and once a file is open you can switch between them without reloading it. Part of the 2suite.io privacy-first ecosystem.

Frequently Asked Questions

Does it handle nested JSON?

Yes. Nested objects are flattened into dotted column names such as address.city. Arrays inside a record are kept as JSON text in one cell.

What if records have different keys?

Every key becomes a column, in the order it first appears, and records without that key get an empty cell.

Can I convert JSON Lines to CSV?

Yes. JSON Lines files with one object per line are read the same way as an array of objects.

Can I paste JSON instead of opening a file?

Yes. Paste the JSON text onto the page and it opens as a table, the same as a dropped .json or .jsonl file.

My JSON has the records under a data key. Will it work?

Yes. An object wrapping one list is accepted, the list is used as the rows, and the page tells you it did that.

Was this helpful?