This tool converts an Excel .xlsx workbook into CSV without Excel, a server round-trip, or any external library. Pick a file, choose a sheet and delimiter, and get clean RFC-4180 CSV you can drop into a database import, a data pipeline, or a script.
How it works
An .xlsx file looks like a single document but is actually a ZIP archive containing several XML files. The converter takes advantage of that structure using only browser-native APIs:
- Unzip. It walks the ZIP’s local file headers and decompresses each entry with the built-in
DecompressionStream("deflate-raw"), the same DEFLATE algorithm the archive was written with. - Shared strings. Text in
.xlsxis usually stored once inxl/sharedStrings.xmland referenced by index from cells, which keeps files small. The tool parses that table first. - Worksheets. Each
xl/worksheets/sheetN.xmlis parsed cell by cell. The cell’stattribute tells the parser whether it is a shared-string index (s), an inline string (inlineStr), a plain string (str), a boolean (b) or a number, and the value is resolved accordingly. Cell references likeC5are decoded so blank cells are padded and columns stay aligned. - CSV output. Rows are joined with your chosen delimiter, and any value containing the delimiter, a quote, or a newline is quoted and its quotes doubled, per RFC 4180.
Tips and notes
- Formulas export as their last calculated value, because Excel caches that value next to the formula. If a workbook was never opened in Excel after the formula was written, that cached value may be missing.
- Formatting is not data. Number formats, colours and merged cells do not survive the trip to CSV; only the underlying values do. A cell displayed as
£1,234.50exports as1234.5. - Use the semicolon delimiter if your downstream tool expects the European CSV convention, and tab to produce a TSV that pastes cleanly into other spreadsheets.
To go the other way and build a workbook from CSV, use the companion CSV to XLSX converter.