CSV to JSON Converter

Inputs

Results

CSV is what spreadsheets and databases export; JSON is what web apps and APIs expect. Converting between them by hand breaks as soon as a value contains a comma, a quote or a line break. This converter follows the CSV standard (RFC 4180), so those cases come through intact.

How to use it

  1. Pick the direction, then paste your data or open a file (up to 5 MB).
  2. For CSV, the delimiter is detected (comma, semicolon, tab or pipe); untick “First row is the header” to get arrays instead of objects.
  3. Copy or download the result.

Example: the CSV name,city,age / Ada,"London, UK",36 becomes [{"name": "Ada", "city": "London, UK", "age": 36}]: the quoted comma stays inside the city, and 36 becomes a number. Going back, nested values like ["admin"] are written as JSON text in their cell.

Questions and answers

Why does my European CSV come out as one column?

Spreadsheets set to languages that use a decimal comma export with semicolons. Detection usually catches it; otherwise choose “Semicolon” as the delimiter.

What does "protect against spreadsheet formulas" do?

A cell starting with =, +, - or @ can run as a formula when the CSV is opened in a spreadsheet. The option adds a ‘ in front of such text cells (numbers are left alone), the standard defense against CSV injection.

Why are some numbers kept as text?

Values like 007 or 0123 would lose their leading zeros as numbers, so they stay text. Untick “Convert numbers” to keep every value as text.

Is my file uploaded?

No. The file is read and converted in your browser.

Link with pre-filled values

Add # and these parameters to the end of this page's address to open the tool with values already filled in.

ParameterWhat it sets
modecsv (CSV → JSON) or json (JSON → CSV).
delimiterauto, comma, semicolon, tab or pipe.
header1 if the first CSV row holds column names.
types1 to turn numbers and true/false into JSON types.
safe1 to guard CSV output against spreadsheet formulas.

Example: https://toolabelle.com/csv-to-json/#mode=csv&delimiter=semicolon&header=1&types=1&safe=1

Related tools