ToolDash
JSON to CSV Converter

JSON to CSV & CSV to JSON Converter

Paste or upload a JSON array to get a spreadsheet-ready CSV, or switch direction to turn a CSV export into JSON. Quoting is handled for you, and a table preview shows exactly how the rows will land.

  • Free, no sign-up
  • Runs in your browser — nothing is uploaded
  • Instant results, no waiting on a server

Delimiter

JSON Input
Size: 0 BLines: 0
CSV Output
Size: 0 BRFC 4180 · Comma

How to convert JSON to CSV (or back)

  1. 1Choose JSON → CSV or CSV → JSON at the top. Uploading a .json, .csv or .tsv file picks the direction for you.
  2. 2Paste your data into the input panel, or click Load Sample to see an example with nested objects and quoted fields.
  3. 3Pick a delimiter (comma, semicolon, tab or pipe) and set the options: header row, flattening nested objects into dot-path columns, and, for CSV → JSON, detecting numbers and booleans.
  4. 4Check the table preview, then copy the output or download it as converted.csv or converted.json. Swap feeds the output back in as input in the other direction.

How the conversion works

Converting a JSON array to CSV works best when it is an array of objects, which is the shape most APIs and databases export. Every distinct key becomes a column, in the order it's first seen, so objects with missing fields still line up and leave those cells empty. A single object becomes one row, an array of arrays is written row by row, and an array of plain values becomes a single value column.

CSV has no concept of nesting, so nested objects need a decision. With flattening on, {"address": {"city": "Paris"}} becomes a column named address.city. With it off, the whole object is written as a JSON string in one cell. Arrays are always written as JSON strings, because spreading them over numbered columns rarely survives a round trip. In the other direction, headers containing dots are rebuilt into nested objects, so a file you flattened comes back with its original structure.

Quoting follows RFC 4180, the closest thing CSV has to a standard. A field is wrapped in double quotes if it contains the delimiter, a quote, a line break or leading or trailing spaces, and quotes inside it are doubled. The parser accepts the same rules, including quoted fields that span several lines, CRLF or LF line endings, and the byte-order mark Excel adds. An unclosed quote is reported with the line it started on.

When detecting types, 42 and 9.5 become numbers, true and false become booleans, null becomes null, and a cell holding a JSON array or object is parsed back into one. Values that would lose information stay as strings: 007 keeps its leading zeros, and integers too large for JavaScript's number type, like long IDs, aren't rounded. Untick 'Detect numbers & booleans' to keep every value as a string.

When developers reach for it

Sharing API data with non-developers

Turn a JSON response into a CSV that opens straight in Excel, Numbers or Google Sheets.

Importing spreadsheets

Convert a CSV export from a CRM, analytics tool or spreadsheet into JSON for seed data, fixtures or an API request.

Converting nested JSON to CSV

Get a flat, column-per-field view of nested JSON documents from MongoDB, Firestore or Elasticsearch.

Fixing European CSV files

Read or write semicolon-delimited files, which Excel uses in locales where the comma is the decimal separator.

Frequently asked questions

Is my data uploaded to a server?

+

No. Parsing and conversion run in your browser. Files you upload are read locally with the FileReader API and never leave your machine.

How are commas and line breaks inside values handled?

+

Any value containing the delimiter, a double quote or a line break is wrapped in double quotes, and quotes inside it are doubled. That's the RFC 4180 convention Excel and Google Sheets both read correctly.

What happens to nested objects and arrays?

+

With 'Flatten nested objects' on, nested objects become dot-path columns like address.city. Arrays are written as JSON text in a single cell. Converting back with 'Rebuild nested objects' and 'Detect numbers & booleans' on restores both the nesting and the arrays.

Can I convert a TSV file?

+

Yes. Choose the Tab delimiter, or upload a .tsv file and it's selected automatically. Downloads from JSON → CSV are named converted.tsv when Tab is selected.

Can I convert JSON to Excel?

+

Through CSV, yes. The tool writes CSV rather than .xlsx, and Excel opens CSV files directly. The file is saved as UTF-8 without a byte-order mark, so if accented or non-Latin text looks garbled, import it with Data > From Text/CSV and choose UTF-8. In locales where Excel expects semicolons, pick the semicolon delimiter before downloading.

Why did my long ID stay as a string?

+

JavaScript numbers can only represent integers exactly up to 9,007,199,254,740,991. Larger values would be silently rounded, so the converter leaves them as strings rather than corrupt them.