How CSV maps to JSON
CSV (comma-separated values) is a plain text table. Each line is a row, a separator character splits the cells, and usually the first line holds the column names. JSON represents the same information as a list of objects, where each object is one row and the column names become its keys.
This tool reads the CSV properly, following the common rules: a cell wrapped in double quotes can contain commas, line breaks and quote marks (written as two quotes in a row). So "Doe, Jane" stays one cell, and "He said ""hi""" becomes He said "hi". The result is printed with two-space indentation.
CSV itself has no data types, so the tool offers to guess them: with Convert numbers and true/false ticked (the default), 32 becomes the number 32 and true becomes a real boolean. Values that only look like numbers, such as the zip code 007 or 1e3, stay text so no information is lost. Untick the option to keep every value as text.
Why people convert CSV to JSON
Spreadsheets and database exports commonly come as CSV, while web applications, APIs and scripts expect JSON. Typical cases include preparing sample data for a front-end prototype, seeding a database with a few rows, or seeing what a spreadsheet export would look like as structured data.
It suits small jobs where writing a parser would be overkill: paste the table, copy or download the result, move on. If your data starts in a workbook, the Excel to CSV converter can produce the CSV first.
How to convert CSV to JSON here
- Paste or type your CSV into the CSV box. A small sample is loaded, so you can replace it.
- Choose the Separator that your file uses: comma, semicolon, tab or pipe. Many European spreadsheet exports use semicolons.
- Leave First row is the header ticked if the first line holds column names. Untick it and each row becomes a plain list of values instead.
- Read the result in the JSON box, which updates live, then click Copy or Download .json.
There is no file upload, so paste your data in. The conversion runs in your browser and nothing is sent to a server. If a quoted cell is missing its closing quote, an error message tells you.
Behavior worth knowing
A few details explain what you will see in the output:
- Short rows get empty strings for missing cells, and cells beyond the header count are dropped.
- Duplicate or empty column names are made unique (name, name_2) or named column1, column2 and so on, so no data is overwritten.
- Blank lines are skipped, and a leading byte-order mark from a spreadsheet export is ignored.
- Spaces inside cells are kept exactly as written, apart from the number and true/false detection.
Check the output against your source for anything important. To go the other way, use JSON to CSV, and the JSON formatter if you want to reindent the result.