SuperDevTools

CSV to JSON Converter (and JSON to CSV)

Paste some data, drop a file or click “Open a file”.

Nothing is uploaded: the conversion runs in your browser, even for a 50 MB file.

Turn CSV into JSON, and JSON back into CSV

This CSV to JSON converter works both ways: paste a CSV and get clean JSON, or paste JSON and get a CSV ready for a spreadsheet. The result appears straight away, with a table preview of the first 100 rows.

CSV and JSON in a nutshell

CSV is a plain text file where each line is a record and values are split by a character, usually a comma. It is the everyday exchange format of spreadsheets, CRMs and accounting software.

JSON describes data with objects in curly braces, lists in square brackets, strings, numbers and the values true, false and null. It is what web APIs and configuration files speak.

How to use it

  1. Pick a direction: “CSV → JSON” or “JSON → CSV”.
  2. Paste your data, click “Open a file” or drop the file onto the input box.
  3. Adjust the options. For CSV: “Delimiter” (leave it on “Detect automatically”), “First row is the header”, “Convert types”, “Keep leading zeros”, “Empty cells” and “JSON shape” (array of objects, array of arrays or object keyed by a column). For JSON: delimiter, “Flatten nested objects”, “UTF-8 BOM in the downloaded file” and “Line ending”.
  4. Grab the result with “Copy” or “Download”. “Convert back the other way” sends the output back to the input box.

A worked example

Take this CSV:

store,location.zip,price

Boston,02108,7.99

With types converted and leading zeros kept, you get {"store": "Boston", "location.zip": "02108", "price": 7.99}. The ZIP code stays text, so the leading zero survives, and the price becomes the number 7.99. Tick “Dot notation” and the column turns into "location": {"zip": "02108"}.

When to convert

  • Importing into an app: an online store, a mailing tool or a bookkeeping package often wants CSV, while your data comes out of an API as JSON.
  • APIs and development: turn a price list or a product catalog into JSON to feed a website, a mock server or a test suite.
  • Spreadsheets: open an API response in a spreadsheet to sort, filter or share it with a coworker.

CSV pitfalls

  • The delimiter depends on the spreadsheet's language. In France, Germany, Italy and Spain the comma is the decimal mark (12,50), so spreadsheets there save CSV files with semicolons. If a file from a European colleague lands in one column, it is a semicolon file: detection handles it.
  • Encoding. Without a UTF-8 BOM at the start, a spreadsheet may show “café” instead of “café”. The BOM option is ticked by default; a Windows-1252 file is recognized and flagged.
  • Quotes. A field holding the delimiter, a quote or a line break must be wrapped in quotes, with inner quotes doubled: "Roast ""Italian"" style". The tool follows RFC 4180 both ways and reports a quote that is never closed, with its line number.
  • Leading zeros and dates. A spreadsheet turns the ZIP code 02108 into 2108 and “3-4” into a date. Keep “Keep leading zeros” ticked.

When a row does not have as many fields as the header, a warning gives its number, such as “line 4: 5 fields”.

Nested structures

CSV is flat, JSON is not. From JSON to CSV, {"address": {"city": "Denver"}} becomes an address.city column, and an array such as ["organic", "local"] is written as JSON inside its cell: "[""organic"",""local""]". Columns are the union of every key found, so an object with no “discount” key simply gets an empty cell. The other way round, dot notation rebuilds the objects, so a round trip gives back the same file.

Privacy

Everything runs in your browser, in a background worker that keeps the page responsive even with a 50 MB file. No data is uploaded or stored.

FAQ

Why does my CSV open in a single column?

The spreadsheet expects another delimiter. Pick “Semicolon ;” for a European spreadsheet, or “Comma ,” for a US or UK one.

How do I stop 007 becoming 7?

Tick “Keep leading zeros”: any number starting with a zero stays text. Untick “Convert types” to keep every value as text.

Which JSON can be turned into CSV?

An array of objects, an array of arrays, an object whose values are all objects, or a single object, which gives one row.

What happens with invalid JSON?

The tool shows the line, the column and the cause, such as an extra comma before a closing brace. Fix it and the conversion runs again on its own.