How to decode Base64 to an Excel file
- Paste the Base64 into Base64 or data URI. A prefix such as
data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;base64,can stay. For a long export saved as text, use Open .txt file. - Above the table, a line names the sheet: “First sheet: “Invoices” (3 in the workbook)”. The table has column letters across the top and the sheet’s own row numbers down the side, so row 17 is row 17 in Excel even if rows before it are empty.
- Below the table, the entry list shows every part of the workbook with View and Save.
- Press Download file to save the .xlsx.
Reading the sheet does not need Excel or any add-in. The page unpacks the workbook and parses its XML in your browser, and its Content Security Policy allows no network requests except Cloudflare’s page-view count, so the data stays on your device.
How the preview shows cell values
The table shows what is stored in each cell, without Excel’s number formats. That is usually what you want when checking an export, but a few kinds of cells look different from Excel:
| Cell in Excel | Shown in the preview |
|---|---|
| Text | The text |
25%, $1,234.50 | The stored number: 0.25, 1234.5 |
15/01/2025 | The date serial number: 45672 |
12:00 | The fraction of a day: 0.5 |
=C2*2 showing 241 | 241, the result saved with the file |
TRUE, FALSE | TRUE, FALSE |
#DIV/0! | #DIV/0! |
| Merged cells | The value in the top-left cell only |
To turn a serial number into a date, add that many days to 30 December 1899: datetime(1899, 12, 30) + timedelta(days=45672) gives 15 January 2025. Workbooks that use the 1904 date system, a setting from old Mac versions of Excel, count from 1 January 1904 instead.
Formula results appear only if the program that wrote the file stored them. Excel and LibreOffice do; some libraries write formulas without results, and those cells show up empty.
The preview has limits: it reads the first sheet in workbook order (the leftmost tab, even if it is hidden or another tab was active), up to 200 rows and 30 columns (A to AD). When there is more, the note “Showing up to 200 rows × 30 columns.” appears. Charts, images, comments and formatting are not shown.
XLSX, XLS, CSV or something else
| Base64 starts with | File | What to do |
|---|---|---|
UEsDB | XLSX, or another ZIP-based file | The preview works for XLSX and XLSM |
0M8R4KGxGuE | Legacy .xls (Excel 97–2003) or a password-protected .xlsx | The tool says “This doesn’t look like XLSX” and detects DOC/XLS/MSG (OLE). It cannot tell these apart, and Extension stays xlsx: type xls for a legacy workbook, keep xlsx for a protected one |
77u/ | Text with a UTF-8 byte order mark, usually a CSV export | See Base64 to CSV |
PD94bWwg | XML (<?xml ), possibly an Excel 2003 XML spreadsheet | Save it with the extension xml; Excel opens it |
Two ZIP-based variants need attention. A workbook with macros contains xl/vbaProject.bin; it previews normally, but Excel refuses to open it under the .xlsx extension, so type xlsm before downloading. A binary workbook (.xlsb) keeps its sheets in .bin files instead of XML: the tool still calls it XLSX and lists its entries, but shows no table, and it has to be saved as xlsb.
A CSV sent instead of a workbook triggers “This looks like CSV, not XLSX.” with a Download as .csv button. Excel opens either.
Where Base64 spreadsheets come from
Reporting and accounting APIs return generated exports as a Base64 field in JSON. Automation and low-code platforms often pass files between steps as Base64 strings, and email carries spreadsheet attachments as Base64 MIME parts. For the opposite direction, from a workbook to a string, use Excel to Base64.
Read a Base64 workbook in Python
With the openpyxl package, the workbook can be read straight from the decoded bytes:
import base64, io
from openpyxl import load_workbook
with open("export.b64") as f:
raw = base64.b64decode(f.read())
wb = load_workbook(io.BytesIO(raw), data_only=True)
ws = wb.worksheets[0]
for row in ws.iter_rows(values_only=True):
print(row)
data_only=True returns the saved formula results instead of the formulas, the same values the preview shows. Unlike the preview, openpyxl applies the number formats to dates, so the cell above comes back as datetime(2025, 1, 15, 0, 0). More decoding options are on Base64 in Python.
FAQ
How do I convert Base64 to an Excel file?
Paste the string above and press Download file. The workbook is saved as decoded.xlsx with exactly the bytes that were encoded, so formulas, formatting and every sheet are intact.
Why do dates show up as numbers like 45672?
Excel stores a date as the number of days since 30 December 1899 and only formats it as a date on screen. The preview shows the stored value: 45672 is 15 January 2025, and Excel displays it as a date again when you open the file.
Can I see the other sheets?
The table shows the first sheet only. The others are listed as xl/worksheets/sheet2.xml and so on; View shows their raw XML, where text cells are numbers pointing into xl/sharedStrings.xml.
Excel says the file format or extension is not valid. Why?
The extension does not match the content. A workbook with macros (it contains xl/vbaProject.bin) must be saved as .xlsm, and a legacy workbook detected as OLE needs .xls; type the right one in Extension and download again.