To convert a CSV file to JSON, drop it above or paste its content: each row becomes a JSON object whose keys are the column names from the first row, and the result appears next to it as you type. The delimiter (comma, semicolon, tab or pipe) is detected automatically, numbers and booleans are recognised, and nothing is uploaded: the conversion runs in your browser. Copy the JSON or download it as a file, up to 50 MB.
A small example
This CSV, with a header row:
- Row 1 (headers): name;age;city
- Row 2: Ana;32;Lyon
- Row 3: Tom;007;Nice
gives a list of two objects: one with name “Ana”, age 32 (a number) and city “Lyon”, one with name “Tom”, age “007” and city “Nice”. The leading zeros of “007” are kept, so the value stays text: this protects codes, postal codes and identifiers. The semicolon was detected on its own.
The settings
| Setting | What it does | Default |
|---|---|---|
| 1st row = headers | The first row gives the keys. Switched off, each row becomes a plain list of values | On |
| Delimiter | Comma, semicolon, tab or pipe, or auto-detect | Auto |
| Recognise numbers and booleans | Turns 12 or 3.5 into numbers, true and false into booleans, null into null; a number with a leading zero, or 16 characters or more, stays text | On |
| Indentation | 2 or 4 spaces, tab, or minified on one line | 2 spaces |
| Sort keys | Sorts the keys of every object alphabetically | Off |
Empty header cells are named field1, field2… and duplicate headers get a numeric suffix (name, name_2), so no column is lost. A row with more values than headers keeps the extra ones under the names field4, field5… (the number is the column position). A row with fewer values gets empty text for the missing ones.
When the CSV has a problem
A line whose number of fields differs from the first line is reported with its line number and the expected and found counts, and an unclosed quote is reported with its line. Fields in quotes may contain line breaks and delimiters: they are read as one value.
Common cases
- An export from Excel: save as CSV, drop it here. A semicolon delimiter (common with French settings) is detected without any action.
- Data for a web page or an API: switch off “Recognise numbers” only if you need every value as text.
- The other way round: JSON to CSV flattens nested objects into columns such as address.city.
- Several formats: the Data converter goes between CSV, JSON, XML and YAML, and the JSON formatter cleans the result.
- To edit the table first: open it in the CSV editor or the online spreadsheet.
Limits and privacy
- Size: 50 MB at most. Above 1,000,000 characters the text boxes only show an extract, and the full file stays available to download.
- Privacy: the conversion runs in your browser, your data is never sent to a server.