DevKitHub

JSON & Data

Excel to CSV Converter — XLSX to UTF-8 CSV Without Rounding

Choose an .xlsx file and a sheet to get it as CSV, ready to copy or download. The workbook is read by JavaScript in this page and never leaves your device.

or drop one here. The workbook is unzipped and read in your browser; it is never uploaded.

download only
0 lines

Values are written as stored, not as formatted: 4006381333931 stays whole where Excel’s Save As CSV writes 4.00638E+12 for a General column. The byte order mark goes into the download only. Escaping works as in JSON to CSV, and CSV to Excel goes the other way without losing leading zeros.

This tool runs entirely in your browser. Your input is never uploaded, stored or logged.

How it works

Excel’s own Save As CSV writes each cell as it is displayed, not as it is stored. In Excel for Mac, a 13-digit barcode in a General column came out as 4.00638E+12, seven digits gone; 1234.5 formatted as #,##0.00 came out as "1,234.50", with a comma in it; 0.1 formatted as a percentage came out as 10%; and the plain CSV format wrote é in the Mac Roman encoding. This converter reads the .xlsx itself and writes what is stored: numbers to the 15 significant digits Excel keeps, with a dot for the decimal point and no grouping, TRUE and FALSE for booleans, the error text for cells such as #N/A, and for a formula the result Excel last saved. Dates need a choice, because a date is stored only as a day count: ISO 8601 — 2026-09-29, or 2026-09-29 13:45:00 with a space, which databases and spreadsheets both read — the text Excel displays, or the serial number itself.

The output follows RFC 4180. Fields are separated by the delimiter you choose, records end with CRLF, as RFC 4180 specifies, with LF as an option, and a field is quoted only when it holds the delimiter, a quote or a line break — or every field, if you prefer. A cell containing a line break stays one quoted field, which the RFC allows but tools that read a line at a time do not expect, so such cells are counted. The table is the sheet’s used range, from the first cell with a value to the last, and short rows are padded so every line has the same number of fields. A CSV holds one sheet, so the sheet picker decides which, and hidden sheets are marked. Merged cells can be filled with their value, as in Excel to JSON.

Two things decide whether the CSV opens safely in a spreadsheet later. The first is encoding: the text is UTF-8, and Excel reads a CSV that has no byte order mark in a legacy code page, so café arrives as café. Add BOM puts the three bytes EF BB BF at the start of the downloaded file, as Excel’s own CSV UTF-8 format does, and never into the text you copy; leave it off for programs that would read the mark as part of the first header. The second is formulas. In the workbook a text cell beginning with =, +, - or @ is inert, because its type says it is text, but a CSV has no types, so a spreadsheet opening the CSV runs it as a formula. Every such cell is counted, and Escape formulas prefixes it with an apostrophe or a tab inside quotes, the two forms OWASP describes — the same option JSON to CSV has.

Common problems

Every example below is run against this tool in our test suite, so what it says here is what the tool actually does.

This workbook is password-protected.

0M8R4KGxGuFFAG4AYwByAHkAcAB0AGUAZABQAGEAYwBrAGEAZwBlAA==
Why:
Excel encrypts a password-protected workbook whole and wraps it in an OLE2 compound file (the input above is such a start, in Base64), so it is no longer a ZIP and no cell can be read without the password.
Fix:
Open it in Excel, remove the password from the file, save it, and convert the saved copy.

The file is not a readable ZIP archive: its end-of-central-directory record is missing, so it is cut short or not a ZIP at all.

UEsDBBQAAAAIAA==
Why:
An .xlsx keeps its table of contents at the very end of the file, so a download or attachment that stopped early begins correctly and still cannot be read. A cloud-synced file that has not finished downloading does the same.
Fix:
Download or copy the file again and check that its size matches the original.

Accented letters show up as café when Excel opens the CSV.

Why:
Excel reads a CSV without a byte order mark in a legacy code page instead of UTF-8, so each non-ASCII character turns into two or three wrong ones.
Fix:
Turn on Add BOM before downloading, or import the file with Data > From Text/CSV and choose UTF-8.

A cell ran as a formula when the CSV was opened.

Why:
Text such as =HYPERLINK(…) or @SUM(…) is harmless in the workbook, where the cell is typed as text, but a CSV cannot say that, so a spreadsheet runs it. That is CSV injection when the text came from a user.
Fix:
Turn on Escape formulas before sharing the file. The warning counts the affected cells even while it is off.

Only one sheet ended up in the CSV.

Why:
A CSV file is a single table, so a workbook with several sheets needs one CSV per sheet.
Fix:
Choose each sheet in turn and download it, or use Excel to JSON with All sheets to get every sheet in one file.

Frequently asked questions

How do I convert Excel to CSV in UTF-8?
The CSV here is always UTF-8. For a file that Excel will open again, turn on Add BOM, which marks it as UTF-8; for a database import or a script, leave it off, since some programs read the mark as part of the first column name.
Why is this different from Excel’s Save As CSV?
Excel writes what each cell displays, so formatting changes the data: a long number can become 4.00638E+12 and 1234.5 can become "1,234.50". This converter writes the stored value, to the 15 significant digits Excel keeps.
My Excel uses commas for decimals. Which delimiter should I use?
Semicolon. In locales where the comma is the decimal mark, Excel expects fields separated by semicolons, and a comma-separated file opens with everything in the first column.
Is the workbook uploaded?
No. The .xlsx is unpacked and converted by JavaScript in this page; nothing is sent to a server.

Last updated