CSV to JSON
Turn CSV or tab-separated data into a JSON array of objects, with types converted.
To convert CSV to JSON, paste the CSV into the Input box, leave Delimiter on Detect automatically, keep First row is a header ticked and click Convert to JSON; each row becomes a JSON object keyed by the column names. Quoted fields, embedded commas and line breaks are handled correctly, and the conversion runs entirely in your browser.
How do I convert a CSV file to JSON?
- Open your CSV in a text editor or spreadsheet, copy everything including the header row, and paste it into the Input box.
- Leave Delimiter on Detect automatically, or choose Comma, Semicolon or Tab if the guess is wrong.
- Keep First row is a header ticked to get an array of objects; untick it for an array of arrays.
- Tick Convert numbers and booleans so 42 and true come out as values rather than strings.
- Choose the Indentation and click Convert to JSON.
- Click Copy output, or Download to save a .json file.
The converter uses PapaParse, the most widely used CSV parser in the JavaScript world, so it copes with the awkward cases that break a naive split on commas: fields wrapped in double quotes, commas and line breaks inside those quotes, and doubled quotes used as escapes, all as described in RFC 4180. Windows (CRLF) and Unix (LF) line endings both work, and a trailing empty line is ignored rather than becoming an empty record.
With First row is a header ticked, each subsequent row becomes an object whose keys are the header cells, which is the shape most APIs, charting libraries and NoSQL databases expect. Untick it and you get an array of arrays, one inner array per row, which is better for a plain data grid or when the file has no header. Duplicate header names are kept as they are, so rename them in the sheet first if you need unique keys.
Convert numbers and booleans turns "42" into 42, "3.5" into 3.5 and "true" or "false" into booleans, leaving anything else as a string. Turn it off if you have values such as postcodes, phone numbers or product codes with leading zeros, because "00123" would otherwise become 123. Empty cells become empty strings either way.
Delimiter detection samples the first few lines and picks whichever of comma, semicolon or tab splits them most consistently. UK exports from Excel and Google Sheets are comma-separated; files from continental European Excel are usually semicolon-separated; copying cells straight from a spreadsheet gives tab-separated text, which also pastes fine. Everything runs as JavaScript in your browser tab, so customer lists and financial exports are never transmitted or stored. Files of a few hundred thousand rows convert in a couple of seconds.
How it works: this tool uses plain JavaScript running in your browser tab. No server is involved, so Kilnfile never sees your file. Last reviewed 20 September 2026.
Frequently asked questions
Can I paste straight from Excel or Google Sheets?
Yes. Select the cells, copy, and paste into the Input box. Spreadsheets copy as tab-separated text, which the automatic delimiter detection picks up. Include the header row in your selection if you want named keys.
Why are my numbers wrapped in quotes in the JSON?
Convert numbers and booleans is unticked, so every value is kept as a string. Tick it and plain numbers and true/false become proper JSON types. Keep it off for postcodes, phone numbers and codes with leading zeros.
What happens with commas inside a field?
Fields containing commas must be wrapped in double quotes in the CSV, which is what Excel does automatically when exporting. The parser follows RFC 4180, so quoted commas, quoted line breaks and doubled quotes inside quoted fields are all read correctly.
My file uses semicolons. Will it work?
Yes. Automatic detection normally spots semicolons, and if not you can pick Semicolon from the Delimiter menu. Semicolon-separated files are common from Excel installs set to a European locale where the comma is the decimal separator.
Is my data uploaded anywhere?
No. Parsing and conversion run inside your browser tab as JavaScript; nothing is sent to a server or stored. That makes it safe for customer data, payroll exports and anything else you would not want to upload to a random website.
Cite this page: “CSV to JSON Converter: Spreadsheet Data to JSON Instantly”, Kilnfile, https://kilnfile.com/text/csv-to-json/
Related tools
Guides
- How to format and validate JSONPretty-print, minify and check JSON in your browser. The RFC 8259 rules that cause most errors, how to read the line and column, and when to sort keys.
- How to count words for essays and applicationsCheck your word and character count the way markers and UCAS do. UK limits for personal statements, essays and dissertations, plus what counts as a word.