CSV ⇄ JSON Converter
Guide: JSON vs YAML vs XML vs CSV: Choosing a Data Format
Nothing you enter or choose here leaves your device. This tool runs in your browser.
A small round trip
name,age,city
Ada,36,"London, UK"
Ben,29,Leeds
[{"name":"Ada","age":36,"city":"London, UK"},{"name":"Ben","age":29,"city":"Leeds"}]With the first row set as the header, each later row becomes an object whose keys come from the header. Notice the quoted field: Ada's city has a comma inside it, and the quotes keep it as one value. The tool follows the CSV standard, RFC 4180, so fields wrapped in double quotes can hold commas, line breaks and doubled quotes.
The settings that matter
- Delimiter. Detected for you. European spreadsheets often save with semicolons because the comma is their decimal mark. Tabs and pipes work too.
- First row is a header. Turn it off if your file has no header, and you'll get lists instead of objects.
- Detect numbers, booleans and empty values. On, the text 42 becomes a number, true becomes a boolean and an empty cell becomes null. Off, everything stays text.
Keep detection off when leading zeros matter. A phone number such as 0412 345 678 or an id such as 007 turns into a plain number if detection is on, and the zero is lost for good.
Going from JSON back to CSV
The easy shape is a list of objects: the columns are the keys, taken from all the objects, so a key missing from some rows leaves an empty cell. A list of lists works too. The awkward part is nested data. A value that is itself an object or an array can't be a flat cell, so it's written into the cell as JSON text. If you need every nested field in its own column, flatten the data first.
Problems that show up in real files
| Symptom | Likely cause | Fix |
|---|---|---|
| Everything in one column | Wrong delimiter | Pick semicolon or tab |
| Odd symbols at the start | A byte order mark added by Excel | Remove the first character, or save as UTF-8 without BOM |
| Dates or long numbers look wrong | Excel turned them into scientific notation or its own date format | Format the column as text before saving |
| Rows with too few fields | An unquoted comma inside a value | Wrap that field in double quotes |
| Accented letters garbled | File saved in a different text encoding | Re-save as UTF-8 |
Data is converted in your browser, so private spreadsheets stay on your device. Once you have JSON, tidy it with the JSON formatter, or turn it into code types with the JSON to DTO generator.
Tidy the file before converting
- Make sure every row has the same number of fields as the header.
- Remove blank lines at the end of the file, which become empty records.
- Give each header a unique name, because a repeated name overwrites the earlier one in JSON.
- Avoid spaces and symbols in header names if the JSON will be used in code, so keys like first_name are easier to read than First Name (Legal).
Written by Akinrinmade Michael · Updated October 24, 2026
How to use
- 1Choose CSV to JSON or JSON to CSV.
- 2Paste your data. The delimiter is detected, or you can pick one.
- 3Set whether the first row is a header and whether to detect numbers and booleans.
- 4Click Copy output or Download.
Frequently asked questions
Does it handle commas and line breaks inside fields?
Yes. Fields wrapped in double quotes can contain commas, line breaks and doubled quotes (""), as in the CSV standard (RFC 4180).
What does "detect numbers, booleans and empty values" do?
It turns 42 into a number, true and false into booleans, and empty cells into null. Turn it off to keep every value as text, which keeps leading zeros such as 007.
What JSON can be turned into CSV?
A list of objects (columns are the keys from all objects) or a list of lists. Nested objects and arrays are written into the cell as JSON text.
Is my data uploaded?
No. Conversion runs in your browser, so private spreadsheets stay on your device.
Read the guide
Learn how this works and how to get the most from it.
Developer
JSON vs YAML vs XML vs CSV: Choosing a Data Format
The strengths and weaknesses of JSON, YAML, XML and CSV, with simple advice on which to use for APIs, config files and spreadsheets.
3 min read
Related tools
JSON Formatter & Validator
Prettify, minify and validate JSON, with error line numbers.
YAML ⇄ JSON Converter
Convert YAML to JSON and JSON to YAML with error line numbers.
Sort & Dedupe Lines
Sort lines A-Z, reverse them, remove duplicates and trim whitespace.
Text Diff Checker
Compare two texts side by side and see exactly what changed.