How to convert CSV to JSON
- Paste your CSV into the Your CSV box, or use Open a file to load a
.csvor.tsvfile. - Leave Delimiter on automatic, or choose comma, semicolon, tab or pipe.
- Keep First row is a header on to get an array of objects. Turn it off to get an array of arrays.
- Choose the indentation, then select Copy or Download to save
data.json.
How the conversion works
Each CSV row becomes one JSON object, with the header names as keys. Blank lines are skipped, and both Windows and Unix line endings work. A value inside double quotes can hold commas, line breaks and quote marks, and "" inside quotes means one quote character.
Values stay as text by default. That protects postcodes, phone numbers and IDs such as 007. If your data is clean, turn on Convert numbers and booleans, and 42 becomes a number, true becomes a boolean and an empty cell becomes null.
Tips
- European exports often use semicolons because commas are decimal marks. Automatic detection handles this.
- If two columns share a header name, the second is renamed with a number so no data is lost.
- An unclosed quote is reported with a line number, which is the most common reason a CSV breaks.
- Need the reverse? Try JSON to CSV.
- Check the result with the JSON formatter to change the layout or sort the keys.
What CSV is
CSV is a plain text table where each line is a row and a delimiter separates the columns. It has no data types, which is why everything starts as text. There is no single official dialect, so files from different programs use different delimiters and quoting habits. A tool that detects the delimiter saves a lot of trial and error.
Privacy
Spreadsheets often hold names, emails and financial rows. This tool reads your data only inside your browser. Nothing is uploaded, stored or logged.