Convert CSV data into clean JSON for APIs, apps, and scripts. Paste your CSV or choose a file, pick your settings, and copy or download the result. The conversion happens in your browser, so your data stays on your device and is not uploaded to our servers.
Converting CSV to JSON is useful when you need to load spreadsheet data into a web app, send records to an API, seed a database, or hand data to a developer who works with JSON.
How to convert CSV to JSON
- Add your CSV: paste it into the box, or click the drop zone to choose a CSV, TSV, or TXT file. Press Try an example to see how it works.
- Choose a delimiter: leave it on Auto-detect, or pick Comma, Semicolon, or Tab yourself.
- Choose how to treat the first row: use it as the key names, or turn it off if your CSV has no header row.
- Choose how to treat values: Detect types turns plain numbers and true or false into JSON numbers and booleans, and Keep as text leaves everything as text.
- Convert and save: press Convert to JSON, check the preview, then copy the JSON or download it as a file.
Settings options
| Setting | Choices | What it does |
|---|---|---|
| Delimiter | Auto-detect, Comma, Semicolon, Tab | Sets the character that separates columns. Auto-detect picks the one used most in the first row. |
| First row | Use as keys, No header row | Use as keys gives a list of objects named after your columns. No header row gives a list of lists. |
| Values | Detect types, Keep as text | Detect types turns plain numbers and true or false into JSON numbers and booleans. Keep as text leaves every value as text. |
| Formatting | Pretty, Minified | Pretty adds line breaks and indents for easy reading. Minified makes the smallest output. |
How CSV becomes JSON
| CSV | Example | Result |
|---|---|---|
| Header row | name,age | The column names become the keys of every object. |
| Data row | Ana,30 | Becomes {"name":"Ana","age":30} when Detect types is on. |
| Quoted value | "Lim, Jr." | A comma inside quotes stays part of the value. |
| Escaped quote | "say ""hi""" | Two quote marks in a row inside quotes become one quote mark. |
| Empty cell | Ana,,Manila | The empty cell becomes an empty text value. |
| Short row | Ana | The missing keys are set to empty text. |
What this tool does and does not do
The tool reads standard CSV and turns it into a JSON list, using the settings you choose. Quoted values can contain the delimiter, quote marks, and line breaks, and blank lines are skipped. Header names are trimmed of extra spaces, an empty header name becomes column_ followed by its position, and a repeated header name gets _2, _3, and so on added. Detect types only converts plain numbers without leading zeros and with up to 15 digits, plus the words true and false, so values such as 00123, phone numbers, and very long IDs stay as text. Numbers are written the way JSON writes them, so 0.50 becomes 0.5. Dates are not converted and stay as text, and empty cells stay as empty text instead of null. The tool does not build nested JSON from column names such as address.city, and it does not read Excel files, so save a spreadsheet as CSV first. Your original CSV is not changed.
Tips for better results
- Keep a clear header row: short, unique column names make the best JSON keys.
- Use Keep as text for IDs: codes, ZIP codes, and phone numbers stay exactly as written.
- Set the delimiter by hand if needed: if all your data ends up in one key, the wrong delimiter was detected.
- Check the preview: it shows the start of the JSON so you can confirm the keys and values before you download.
- Save spreadsheets as CSV UTF-8: in Excel or Google Sheets, export as CSV so accented characters are kept.
Converting CSV to JSON turns a flat table into data that web apps, APIs, and scripts can read directly.
Common CSV to JSON problems
- Invalid CSV: a quoted value was opened but never closed. The message under the result gives the line where it starts. Add the missing quote, or remove the stray one.
- All the data is in one key: the delimiter was not detected. Choose Comma, Semicolon, or Tab yourself.
- The keys look like data: your CSV has no header row. Choose No header row to get a list of lists.
- A number lost its zeros or became a number when it should not: choose Keep as text to leave every value exactly as written.
- Accented letters look wrong: save the CSV as UTF-8 and add it again.
- The file was not added: only CSV, TSV, and TXT files up to 5 MB are accepted. Pasting smaller parts of the data also works.
Frequently asked questions
How do I convert CSV to JSON for free?
Paste your CSV or choose a CSV file, pick the delimiter and options, press Convert to JSON, then copy or download the result. No account or software is needed.
Is my CSV uploaded to a server?
No. Your CSV is converted in your browser and remains on your device during conversion.
What does the JSON look like?
By default, the first row is used as the key names, and every row after it becomes one object in a list. If you choose No header row, you get a list of lists instead.
Does the tool detect numbers and true or false values?
With Detect types selected, plain numbers such as 42 or 3.5 become JSON numbers, and the words true and false become booleans. Values with leading zeros, such as 00123, very long numbers, and everything else stay as text. With Keep as text selected, every value stays as text.
Which delimiters are supported?
Comma, semicolon, and tab. Auto-detect looks at the first row and picks the one it finds most often, and you can also choose one yourself.
How are missing values and extra columns handled?
If a row has fewer values than the header, the missing keys are set to empty text. If a row has more values, the extra ones are added under keys named column_ followed by their position, such as column_5. Empty cells stay as empty text.
Is there a size limit?
Files up to 5 MB can be added. For pasted text, keep it to a similar size, because the work happens on your device.