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 the browser reads an .xlsx without a library
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.
The RFC 4180 quoting rules that keep CSV valid
CSV looks trivial until a cell contains a comma, a quote, or a line break — then naive concatenation produces a file that misaligns on import. This converter follows RFC 4180:
| Cell value | Emitted CSV field |
|---|---|
Acme, Inc. | "Acme, Inc." (quoted — contains the delimiter) |
She said "hi" | "She said ""hi""" (quotes doubled) |
line one⏎line two | "line one⏎line two" (quoted — contains a newline) |
plain | plain (no quoting needed) |
Getting this wrong is the most common cause of a spreadsheet “breaking” when re-imported; the tool applies it automatically to every field.
Encoding and delimiter pitfalls
- UTF-8 vs the Excel BOM. This tool outputs plain UTF-8. Some Windows Excel builds assume the system code page unless the file starts with a UTF-8 byte-order mark, which can garble accented characters on double-click. If names look wrong in Excel, import via Data → From Text and select UTF-8.
- Decimal-comma locales. In many European locales Excel uses a comma as the decimal separator and therefore a semicolon as the field delimiter. Choose the semicolon option so numbers land in separate columns.
- Leading zeros and long numbers. CSV has no types, so
007and 16-digit IDs are preserved as text here but may be reinterpreted as numbers by whatever opens the file — a downstream import setting, not something the CSV itself can force.
A pre-flight checklist before converting
Three questions prevent the classic post-conversion surprises. First, does the sheet use formulas whose values you need? CSV stores only values, so confirm the computed numbers (not the formula strings) are what lands in the file. Second, does any column contain leading zeros — phone numbers, ZIP codes, product codes? Excel displays them via cell formatting that CSV cannot carry, so re-opening the CSV in Excel will strip them; import the CSV with text-typed columns instead of double-clicking it. Third, which delimiter does the consuming system expect? Several European locales read semicolon-separated files by default, and a comma-separated file opened there lands in one column.
Dates deserve special mention: Excel stores them as serial numbers with a
display format, and a converted CSV contains whatever textual form the
converter chooses. If the consuming system parses dates, standardise on ISO
8601 (2026-07-02) during conversion rather than relying on a locale-shaped
02/07/2026 that United States systems will read as February 7th.
Finally, remember that CSV is one sheet: converting a multi-tab workbook means choosing a sheet (or exporting each separately), and any cross-sheet formulas are evaluated to their values first — so confirm which tab the consuming system actually needs before automating the pipeline around the wrong one.
Sources
- IETF — RFC 4180: Common Format and MIME Type for CSV Files — the quoting rules above.
- ECMA-376 — Office Open XML File Formats — the .xlsx package structure.
To go the other way and build a workbook from CSV, use the companion CSV to XLSX converter.