CSV to JSON converter (and JSON to CSV)

This CSV to JSON converter also works backwards (JSON to CSV): paste a table or JSON, pick the direction, copy the result or download it. The tool detects comma, semicolon, tab or pipe delimiters by itself, turns numbers into real numbers and reports errors with the line number. Your data never leaves the browser.

Source: § 2, IETF RFC 4180 – Common Format and MIME Type for Comma-Separated Values (CSV) Files. Updated: .

CSV: first row = column names. JSON: an array of objects or arrays.

Your text stays in your browser – it is not sent, not stored and not added to the address bar.

CSV → JSON: column names become keys. JSON → CSV: write a header row with the keys.
42 becomes the number 42; 007 stays text (leading zeros would be lost otherwise).
My ToolboxYour inputs are saved in this browser only.

Result

Result
[ { "name": "Anna Miller", "city": "Boston", "age": 34, "active": true }, { "name": "Ben Shaw", "city": "Denver", "age": 28, "active": false }, { "name": "Cem \"CJ\" Young", "city": "Austin", "age": "", "active": true } ]
Size
3 data rows, 4 columns, 281 characters. Detected delimiter: comma.

How it is calculated

CSV (comma-separated values) is the simplest table format: one line per record, fields split by a delimiter. JSON is the data format of web APIs. This tool converts in both directions – entirely in your browser.

How to convert CSV to JSON

  1. Paste the CSV text (from a spreadsheet: copy the cells and paste – the delimiter is then a tab).
  2. Keep the direction “CSV → JSON”. The delimiter is detected; choose one yourself if needed.
  3. Pick the shape: an array of objects (each row becomes {"column": value}) or an array of arrays.
  4. Copy the result or download it as daten.json.

Types: number or text?

CSV has no data types – everything is text. With “Detect numbers and true/false” values become JSON numbers, but only when nothing is lost: the value must be a valid JSON number under RFC 8259 § 6 (no leading zero, no plus sign, no decimal comma) and fit into 15 significant digits. ZIP codes like 01067, phone numbers and card numbers stay text.

Converting JSON to CSV

An array of objects becomes a table: the columns are the union of all keys in order of first appearance, missing values stay empty. Nested objects and arrays are written as JSON text into the cell because CSV has no depth. Fields containing the delimiter, a quote or a line break are quoted as RFC 4180 requires.

Limits

Frequently asked questions

How do I convert CSV to JSON?

Paste the CSV into the input box and choose “CSV → JSON”. The first row provides the keys, every further row becomes an object. Copy the result or download it.

Why does my CSV use semicolons instead of commas?

In many European locales spreadsheets use the comma as decimal mark and therefore write the semicolon as list separator. The tool detects both automatically; if in doubt, pick the delimiter by hand.

Are leading zeros (like ZIP code 01067) kept?

Yes. Values with a leading zero stay text because JSON numbers may not have one (RFC 8259). To keep everything as text, switch off “Detect numbers and true/false”.

What happens to nested JSON when converting to CSV?

CSV is flat, so objects and arrays inside a record are written as JSON text into the cell. Flatten the structure first if you need a plain table.

How do I convert CSV to JSON in Python?

With the standard library: csv.DictReader(file) reads rows as dictionaries and json.dumps(list(reader), indent=2) writes them as JSON. For a one-off conversion this page is quicker.

Is my data uploaded anywhere?

No. The conversion runs in your browser and makes no server request. The input is not stored or added to the address bar either.

Sources and legal basis

As of:

Related tools