CSV to JSON Converter
Convert CSV data to a JSON array of objects with header mapping and automatic comma, semicolon, or tab detection.
CSV to JSON Converter tool
Example
Input: name,age / Ada,36 / Alan,41 (3 lines)
Result: A 2-space indented JSON array: [ { "name": "Ada", "age": "36" }, { "name": "Alan", "age": "41" } ]
The first row supplies the keys and each later row becomes one object. Cell values are kept as strings, exactly as they appear in the CSV.
- Paste your CSV data, including a header row, into the CSV panel.
- The tool auto-detects whether the delimiter is a comma, semicolon, or tab and converts as you type.
- Check that each row appears as an object keyed by your header names, with values kept as strings.
- If a quoted field is not closed, fix the error shown below the panels and the JSON updates.
- Review the generated JSON output and click the copy button to use it in your project.
Turning CSV Rows into JSON Objects
This tool converts CSV into a JSON array of objects. The first row supplies the keys and each later row becomes one object, so name,age followed by Ada,36 becomes [{"name": "Ada", "age": "36"}].
You do not need to set a delimiter. Before parsing, the tool looks at the header line and counts the commas, semicolons and tabs that sit outside quotes. Whichever appears most is used. So exports from European versions of Excel, which often use semicolons, and tab-separated data copied from a spreadsheet both work as they are.
Every value stays a string. The number 36 comes out as "36", and a ZIP code like 01234 keeps its leading zero. That is deliberate, because guessing types breaks IDs, phone numbers and codes. Convert the fields you need in your own code. Short rows get empty strings for the missing cells, and blank lines are skipped. Spaces around unquoted values are trimmed, while quoted values are kept exactly as written.
Quoted fields follow RFC 4180. They can hold the delimiter, line breaks and doubled quotes (""), which stand for one quote character. If a quote is never closed, you get an Unterminated quoted field error instead of a wrong result. The panels also work in reverse, turning JSON back into comma-separated CSV. To start from a spreadsheet file, convert it first with Excel to CSV, and to check the result, open it in the JSON Formatter.
Sources
Frequently Asked Questions
Related Tools
JSON to CSV Converter
Convert a JSON array of objects to CSV with automatic column headers, and convert CSV back to JSON in the same tool.
Developer ToolsJSON Formatter and Validator
Format, validate, beautify, and minify JSON data with a collapsible tree view and line-and-column error detection.
Developer ToolsCSV to Excel Converter
Convert CSV files to downloadable .xlsx Excel spreadsheets instantly in your browser. No upload to any server required.
File ConvertersExcel to CSV Converter
Parse .xlsx and .xls Excel spreadsheets to CSV format with sheet selection. All processing happens in your browser.
File Converters