Base64 to Excel
Decode a Base64 string into a downloadable Excel (.xlsx) file, or encode an .xlsx to Base64 — instantly and locally. Nothing is uploaded, so it's safe for confidential spreadsheets.
How to convert Base64 to an Excel file
Paste the Base64 for your spreadsheet into the box above — a full data URI (data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;base64,UEsDBB…) or just the raw payload both work. The tool decodes the bytes locally and checks that they begin with the PK signature that marks a real .xlsx. Click Download .xlsx to save the file as spreadsheet.xlsx, then open it in Excel, Google Sheets, or LibreOffice Calc. To go the other way, flip the toggle to Excel → Base64 and drop an .xlsx onto the drop zone.
Why is an .xlsx a ZIP file?
A modern Excel workbook uses the Office Open XML format, and every OOXML document is really a ZIP archive of XML parts — one entry for the workbook, one per worksheet, plus shared strings, styles, and relationships. That's why the decoded bytes always start with 50 4B, the two ASCII characters PK (the initials of ZIP's inventor, Phil Katz). If your decoded bytes don't start with PK, they aren't a valid .xlsx: an older .xls uses a different binary container, and a CSV is just plain text. The tool surfaces this check so you know before you try to open the file.
Decoding Base64 to Excel in VBA
You don't need a website to decode Base64 — Excel can do it natively through VBA. The trick is MSXML2.DOMDocument: create an XML node, set its DataType to bin.base64, assign your Base64 text to NodeTypedValue to get the raw bytes, then stream those bytes to disk with ADODB.Stream.
Sub Base64ToXlsx(ByVal b64 As String, ByVal outPath As String)
' Decode a Base64 string to bytes via MSXML, then write the .xlsx
Dim dom As Object, node As Object, stream As Object
Set dom = CreateObject("MSXML2.DOMDocument")
Set node = dom.createElement("b64")
node.DataType = "bin.base64"
node.Text = b64 ' your Base64 string
Set stream = CreateObject("ADODB.Stream")
stream.Type = 1 ' adTypeBinary
stream.Open
stream.Write node.NodeTypedValue ' the decoded bytes
stream.SaveToFile outPath, 2 ' adSaveCreateOverWrite
stream.Close
End Sub
Call it with Base64ToXlsx(myBase64, "C:\Temp\spreadsheet.xlsx"). Because bin.base64 handles the decode and ADODB.Stream writes raw binary, the resulting file is byte-for-byte identical to the original workbook.
Is this private?
Yes. Both directions run entirely client-side in JavaScript. When you decode, the Base64 is turned into bytes and a downloadable blob in the browser; when you encode, your .xlsx is read into memory with the FileReader API and encoded locally. The spreadsheet is never sent to a server — which matters for confidential financials, HR data, or customer lists. You can confirm it in DevTools → Network: converting fires no request.
Frequently asked questions
How do I convert a Base64 string to an Excel file?
Paste your Base64 into the box above and click Download .xlsx. The tool decodes it to raw bytes locally, checks for the PK (ZIP) header of a valid .xlsx, and saves the result as spreadsheet.xlsx — ready to open in Excel, Google Sheets, or LibreOffice Calc.
Why does my file open as corrupted?
Usually the Base64 is truncated or picked up stray characters, so the decoded bytes are an incomplete ZIP and won't open. Confirm the bytes start with PK; if the tool warns there's no PK/ZIP header, the source may not be an .xlsx at all — it could be an older .xls, a CSV, or unrelated data.
How do I Base64-encode an Excel file?
Switch to Excel → Base64 mode and drop your .xlsx (or .xls) onto the drop zone. It reads the file locally and outputs the raw Base64 string, which you can copy into JSON, an API payload, a database column, or an email attachment field.
Can I decode Base64 inside Excel itself?
Yes — a short VBA macro does it. Create an MSXML2.DOMDocument node with DataType = "bin.base64", assign your Base64 text to NodeTypedValue to get the bytes, then write them to disk with an ADODB.Stream. See the VBA snippet above for the full routine.
Need plain Base64 encode/decode?
The main base64.dev tool handles text, files, and URL-safe mode with auto-detect.
Open base64.dev →