Base64 to Excel XLSX Converter – Free

Turn a Base64 string from an export API or email attachment back into an Excel workbook. This Base64 to Excel converter validates the XLSX package in your browser before you download it.

How to use the Base64 to Excel (XLSX) tool

  1. Paste the encoded workbook under Base64 or Base64 data URL.
  2. Select Decode file. The tool decodes the text, then opens the result as a ZIP package to look for the workbook parts.
  3. Check the Result box for the byte count and the spreadsheet media type.
  4. Select Download to save decoded.xlsx, then open it in Excel or another spreadsheet program.

What is inside an XLSX file

An .xlsx workbook is not a single binary blob. It is a ZIP archive laid out according to the Open Packaging Conventions of ECMA-376, also published as ISO/IEC 29500. Each sheet, the shared string table and the styles are separate XML parts.

  • [Content_Types].xml lists the type of every part in the package.
  • xl/workbook.xml names the sheets and their order.
  • xl/worksheets/sheet1.xml and its siblings hold the cell data.
  • xl/sharedStrings.xml stores text values once, referenced by index from the cells.
  • xl/styles.xml defines number formats, fonts and fills.

How this Base64 to Excel check works

The tool runs three tests. First the decoded bytes must start with a ZIP signature, PK followed by 03 04 or 05 06. Second, if you pasted a data URL, its declared type must be empty, application/octet-stream, application/zip or the official spreadsheet type. Third, the archive is opened and must contain both [Content_Types].xml and xl/workbook.xml.

Only then does the Result show the size and application/vnd.openxmlformats-officedocument.spreadsheetml.sheet. The cells are not parsed or displayed, and no preview is drawn. The download is the original package, byte for byte.

Worked example with two ZIP packages

The 32 characters in the first example encode a valid but empty ZIP archive of 22 bytes. It passes the signature test, then fails the content test, because an empty archive has no workbook part. The second example is a minimal one-sheet workbook built for this guide, which passes all three tests. Workbooks written by Microsoft Office usually start with UEsDBBQABgAIAAAAIQ.

Input:   UEsFBgAAAAAAAAAAAAAAAAAAAAAAAA==
Result:  The ZIP container does not contain a XLSX document.

Input:   minimal one-sheet workbook (2,492 Base64 characters)
Result:  1,868 bytes · application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
File:    decoded.xlsx

Files that look like Excel but are rejected

Several spreadsheet formats share the Excel name without sharing the XLSX structure.

  • Legacy .xls workbooks. They use the older compound binary format, whose Base64 starts with 0M8R4KGxGuE. The tool answers These bytes do not have an Office document container.
  • Password-protected .xlsx files. Encryption wraps the package in that same compound format, so they fail the ZIP test as well.
  • CSV or tab-separated text. It has no container at all.
  • .xlsb binary workbooks. They are ZIP packages but store xl/workbook.bin, not xl/workbook.xml.
  • Word or PowerPoint packages. They pass the ZIP test and fail the workbook test.

Frequently asked questions

Is my spreadsheet uploaded during conversion?

No. The workbook is decoded and its ZIP directory is read by JavaScript in your browser. Financial exports and customer lists stay on your machine.

Why does the tool say the declared Office file type does not match?

Your data URL names a media type other than the XLSX type, application/zip or application/octet-stream. A common culprit is application/vnd.ms-excel, the label for legacy .xls. Remove the data: prefix and paste only the Base64 to skip this test.

Can I view the sheet contents on this page?

No. The tool validates the package and gives you the file. It does not render cells or formulas. Open the downloaded decoded.xlsx in a spreadsheet application to see the data.

Does it work with macro-enabled .xlsm files?

They pass validation because they also contain xl/workbook.xml. The download is still named decoded.xlsx, and Excel will not open a macro-enabled workbook under that extension, so rename the file to .xlsm first.

Why does my decoded Excel file open as corrupt?

The Base64 was probably truncated or altered in transit. If the ZIP directory at the end of the file is missing, the tool shows an error from its ZIP reader. If a middle section is damaged, validation can pass and Excel reports the problem later.

Related tools