CSV to JSON
Turn CSV into a JSON array using the first row as keys — in your browser, nothing uploaded.
What is CSV to JSON
CSV to JSON conversion names each column from the first row and folds every following row into one record. Values that parse as numbers stay numeric; everything else becomes a string. If the header row has blanks or duplicates the output falls back to arrays, so no column disappears silently.
File
🔒 Everything runs in your browser. Nothing is uploaded.
What this tool actually does with your file
- Where it runs
- In your browser, on this page
- Upload
- None — the file never leaves your device
- Offline
- Works with the network disconnected
From rows to objects
The header row becomes the keys and every subsequent row becomes an object, giving the array-of-objects shape that every API and every JavaScript consumer expects. A CSV without a header produces arrays of arrays instead, which keeps the data but loses the names.
Values are typed on the way in: integers and decimals become numbers, true/false become booleans, empty fields are omitted. Everything else stays a string, including values with a leading zero — a postcode of 01234 must not become 1234.
Quoted fields are handled properly, so a value containing a comma or a newline does not split the row. This is the difference between a converter and a split(',') one-liner.
When you should keep the CSV as CSV
If the file is going into a spreadsheet or a database bulk load, JSON adds a parse step and nothing else. CSV is smaller and faster for flat data.
If the data is wider than about fifty columns, the JSON becomes hard to read and the file gets larger than the CSV. That is a signal the data model needs normalising, not that the format is wrong.
If the consumer is a human, a Markdown table is more useful than either: JSON adds brackets and quotes that nobody reads voluntarily, and CSV loses the column alignment that makes a table scannable. Choose the format for the reader, not for the parser.
How to use it
- 1.Paste CSV or choose a .csv file
- 2.Pick the output shape
- 3.Run it, then copy the JSON
How CSV to JSON works under the hood
An .xlsx file is not a table — it is a ZIP archive of XML parts. Everything you see as a grid is rebuilt from cell references on this page, in memory, without a round trip to a server.
- 1
Read the file as bytes
The file is read into an ArrayBuffer with the File API. This is a local read, not a request — nothing leaves the tab.
- 2
Unzip and parse the workbook
SheetJS inflates the archive, reads workbook.xml for sheet order, sharedStrings.xml for text, and each sheet's XML for cells and types.
- 3
Rebuild rows in memory
Cells are placed by their A1 reference, gaps become empty cells, and the sheet is materialised as a two-dimensional array.
- 4
Write the output locally
The result is serialised to CSV text or a new workbook and handed to the browser as a Blob download.
Processing pipeline
Why formulas arrive as values
A spreadsheet stores two things per formula cell: the formula text, and the value Excel last computed and cached. A browser parser reads the cached value. Making the formula itself run would mean reimplementing Excel's calculation engine — including volatile functions, circular-reference detection and locale-specific parsing. So the exported CSV contains what you last saw on screen, not a live formula.
What has no CSV equivalent
Merged cells, cell fills, fonts, conditional formatting, comments and pivot tables have no representation in a comma-separated file. A merged cell becomes its value in the top-left position and empty cells elsewhere. Dates are written as dates only when the cell is typed as a date; a date stored as text stays text. These are format limits, not bugs.
Where it gets slow
Parsing is linear in cell count, and the browser holds the whole workbook in memory. A 30 MB file with a million populated cells can take several seconds and a few hundred MB of RAM; the tab may feel frozen while SheetJS works. Splitting the file by sheet, or exporting only the range you need, is faster than retrying with a bigger limit.
Verify it yourself
You do not have to take this on faith. Run the tool once with DevTools open.
- 1.Open DevTools on this page and switch to the Network tab
- 2.Keep the filter on Fetch/XHR and run the tool
- 3.Confirm no request carries your file — you should see only page assets and fonts
Frequently asked questions
Can the header row be non-English?
Yes. Header cells become JSON keys verbatim; even characters that are awkward in identifiers make valid string keys.
How are numbers detected?
CSV carries no types, so anything that parses as a number is emitted as a number and the rest as strings. Columns where a leading zero matters (phone numbers, postcodes) need a type fix after conversion.
Is anything uploaded?
No. Both the parsing and the JSON output happen inside this page.
What this kind of conversion cannot keep
Spreadsheet conversion is lossy by nature: a workbook carries formulas, styles, merged cells and multiple sheets, while CSV carries rows of text. This tool keeps values and order, recalculates nothing, and drops presentation on purpose. That is why it can run without a server — and why a converted file will not look like the original.
More in Spreadsheets & Docs
On this page
- What is CSV to JSON
- What this tool actually does with your file
- How it actually behaves
- How to use it
- How it works inside
- Frequently asked questions
Excel formula reference
29 functions with syntax, arguments and a table you can retype.
Browse the list →