CSV to JSON Converter

Free CSV to JSON converter that also turns JSON into CSV. Handles quotes, line breaks inside fields and semicolon-separated Excel files, right in your browser. Nothing is uploaded.

Adds an apostrophe before text that starts with =, +, - or @, so Excel does not run it as a formula.

What it does


CSV is a table written as text: one record per line, with the fields separated by a delimiter. It looks simple, which is why converters get it wrong without saying so. A comma inside quotes is part of the text, not a new column; a line break inside quotes is part of the field, not a new record; and Excel in Portuguese, Spanish, French or German saves with semicolons, because there the comma is the decimal mark. This converter reads CSV by the rules of RFC 4180, finds the delimiter by looking for the one that gives every line the same number of columns, and turns each row into a JSON object keyed by the header. The other way round, it makes a column for every key that appears in any object, not just in the first one.

How to use it


  1. Paste the CSV or the JSON, or open a file.
  2. Check the options: delimiter, header row and data types.
  3. Convert in the direction you need, then copy or download the result.

Frequently asked questions


Why did my zip codes and IDs stay as text?
Because turning them into numbers would change them. 007 would become 7, and an ID longer than 16 digits would be silently rounded to a different number by JavaScript. Only values that survive the round trip unchanged become numbers; turn off type conversion to keep everything as text.

My CSV came from Excel and everything ended up in one column.
It was probably saved with semicolons and read with commas. Leave the delimiter on automatic detection, which checks the four common ones, or choose semicolon yourself.

Why are decimals like 4,50 kept as text?
In a semicolon file, 4,50 is probably four and a half, but 1,500 could be one and a half or fifteen hundred, and guessing would change values without warning. Convert them in your own program, where you know which one it is.

How are nested objects turned into columns?
With flattening on, {"address": {"city": "Recife"}} becomes a column called address.city. Lists, and objects when flattening is off, are written as JSON text inside the cell, so nothing is lost.

Why protect against formulas?
Spreadsheet programs treat a cell that starts with =, +, - or @ as a formula, and a formula can fetch data from the internet or run commands. If the data came from users or from a website, turn the protection on before opening the file in Excel. Real negative numbers are left alone.

RFC 4180 — CSV
Wikipedia — Comma-separated values
OWASP — CSV Injection