Convert CSV to JSON
Paste a table or open a CSV, TSV or Excel .xlsx file, choose the JSON shape, and download or copy the result. Delimiters are detected, quoted fields with commas and line breaks are handled, and numbers, booleans and empty cells become real JSON values. Everything runs in your browser.
CSV to JSON
or drop a file here. It stays on this device.
- Runs on your deviceNo upload. Your text stays in your browser.
- Free, no accountNo sign-up, nothing added to your data. Limits: files up to 32 MB; XLSX up to 1,000 columns, 200,000 rows and 1,000,000 stored cells, within 2,000,000 table positions.
- FormatsCSV or TSV text, or XLSX saved cell values in; JSON or JSON Lines out
- Works onCurrent Chrome, Edge, Firefox and Safari, desktop and mobile.
How it works
- Paste a table into the editor, or open a .csv, .tsv, .txt or .xlsx file. For an Excel workbook, choose the worksheet to import.
- Check the delimiter and header settings, pick the output shape and how values are converted.
- Press Convert to JSON, then copy the result or download the .json or .jsonl file. Change a setting afterwards and the same text is converted again.
Questions
How is the delimiter chosen?
Automatically, from the first 20 non-empty lines: the separator that appears the same number of times on every line wins (comma, semicolon, tab or pipe). If a file uses a different one or the guess is wrong, pick it yourself; the result line always names the delimiter used.
Which values are converted, and which stay text?
Only with Convert numbers and true/false ticked: plain decimal numbers such as 42, -3.5 or 1e6 become JSON numbers; true and false (any case) become booleans; empty cells become null. Numbers with leading zeros (007, 0123), phone numbers written with a + and 7 to 15 digits (+6591234567) and whole numbers longer than 15 digits stay text, so codes, phone numbers and IDs are never changed. So does any number that a JSON number cannot hold exactly: 123456789012345.68 would become 123456789012345.69 and 9007199254740993.00 or 9007199254740993e0 would become 9007199254740992, so each stays text with every digit as typed, in quotes. A number is converted only when the JSON number has exactly its value (19.90 is written 19.9, 1e6 is written 1000000). Dates, percentages and currency stay text. Each column keeps one type, as a program reading the JSON expects: where any value of a column stays text (007, a word, such an amount), its numbers and true/false stay text too, exactly as typed, and the result names the column. Empty cells are still null.
What happens to the header row and duplicate names?
With the header option on, the first row names the fields, in the order of the columns; any text works as a name. Names are trimmed; an empty name becomes column_N and a repeated name gets _2, _3 and so on. Without a header, fields are column_1, column_2, … in the object and column shapes, and the array shape has no header row.
What about quoted fields, line breaks and rows with a different length?
Quoted fields follow the CSV standard (RFC 4180): they may contain the delimiter and line breaks, and a quote inside is written as two quotes. A quote that never closes is reported with its line number and the editor jumps to it; so is a closing quote followed by other text before the next delimiter, such as "12.50"x, with its line and column, instead of being joined to the cell. Rows with fewer cells than the header are padded with null when values are converted, and with empty strings when they are not. Rows with more keep the extra cells as column_N (column_N_2 when a header already has that name); the result lists which rows were affected. In the one-array-per-column shape every array has one entry per row, so positions line up.
What is JSON Lines?
One JSON object per line, with no surrounding array, saved as .jsonl. It is what log tools, data pipelines and many import commands expect, and it streams well for large files.
Which encodings are supported?
Text is read as UTF-8, with or without a byte order mark. A file saved in another encoding (Windows-1252, for example) still converts, but accented characters may appear wrong; save it as UTF-8 first. Excel: File, Save As, CSV UTF-8. A file that is not text at all, such as a picture, a PDF or random bytes under a .csv name, is refused rather than converted.
Can I open an Excel workbook?
Yes: choose an .xlsx file and select its worksheet if it has more than one. The table is filled with saved cell values; number cells are read as Excel shows them, to 15 significant digits, so a stored -85.40000000000001 is -85.4, and text cells exactly as typed. Formula results are read from the last saved calculation; formulas are never executed. Common date formats become ISO dates and simple zero-padded identifiers keep their zeros. Charts, macros and formatting are not imported. A formula without a saved result or a cell containing a spreadsheet error is reported before import. Old .xls, encrypted files and .xlsm are not accepted; save as .xlsx or CSV first.
Is my text uploaded?
No. The page loads a small script into your browser and every operation runs on your device. You can check this yourself in the browser's network panel: after the page has loaded there are no upload requests. Closing the tab discards the text.
Do I need an account or to pay?
No. These basic tools are free and add nothing to your data. The only limits are the tool's own: files up to 32 MB; XLSX up to 1,000 columns, 200,000 rows and 1,000,000 stored cells, within 2,000,000 table positions. Within them, the practical limit is your device's memory.
What does this page keep in my browser?
Nothing you open or type. While the tab is open, the tool pages keep a short list of the steps taken in it, in the tab's session storage: the step (page opened, started, succeeded, first success, used again or failed), the tool's name, the time, how many files were used and, for a failure, an error code; never a file name, the contents of a file or your text. It holds at most the latest 200 steps, and the browser deletes it when the tab closes. The page never sends it. Where a Report a problem button is shown, you can attach the last 20 steps to your report; nothing is attached unless you tick that box. In local storage the page keeps only choices you made: a Light or Dark theme until you choose System again, the language you picked with the EN / 中文 switch if it differs from your browser's language, and this tool in your recently used list if you switched that list on at the tools page.
Questions or problems
Found a problem or missing feature? Tell us. Please describe the steps; do not send confidential data.