Upload a file
  1. base64hub
  2. File tools
  3. Base64 to Word

Base64 to Word (DOCX)

Paste a Base64-encoded Word document to read its text here and download the .docx. You can check what a file says before deciding to open it in Word.

Free no sign-up, no limits Local nothing uploaded Reads text paragraphs, tables, tabs and line breaks Updated Oct 27, 2026
Input –Output –Size –

Processed in your browser. This page cannot send your data anywhere – how we know

How to decode Base64 to a Word document

  1. Paste the Base64 into Base64 or data URI, with or without a data:application/vnd.openxmlformats-officedocument.wordprocessingml.document;base64, prefix. Long strings can come from a text file via Open .txt file.
  2. Under the file info, Document text shows what the document says: one line per paragraph, with tabs and manual line breaks kept.
  3. Below the text, the entry list shows the parts the .docx is made of, with View and Save for each.
  4. Press Download file to save the .docx.

The preview reads word/document.xml with your browser’s XML parser. Nothing is rendered as a web page, nothing is executed, and the file is not sent anywhere: the page’s Content Security Policy blocks all network requests except Cloudflare’s page-view count.

What the text preview includes

A DOCX is a ZIP archive of XML files. The preview takes the text of the main body and leaves the rest of the structure alone, so it helps to know what ends up where:

In the documentIn the preview
Body paragraphs and headingsOne line each, in document order
TablesEach cell’s paragraphs on their own lines, row by row
Tracked changesShown as if accepted: inserted text appears, deleted text does not
Fields such as page numbers or datesThe last calculated result; the field code is hidden
Text boxes and shapesTheir text, sometimes repeated (see the FAQ)
Headers, footers, footnotes, commentsNot in the text pane; open the matching entry with View
Formatting, images, page layoutNot shown

A document that holds only images or scanned pages produces “No text found in this document.”

Pulling images and other parts out

Because the file is a ZIP archive, every part is available on its own. Pictures sit in word/media/ as image1.png, image2.jpeg and so on: View shows the picture, Save downloads it with its own name. That is a quick way to get a logo or a signature image out of a generated document without opening Word. The document properties in docProps/core.xml show the author, title and the dates stored by the program that saved the file.

The Base64 to ZIP page explains the entry list, its limits and the archive checks in more detail.

DOCX, DOC or something else

The beginning of the Base64 tells you which kind of file you have:

Base64 starts withFileWhat the tool does
UEsDBBQABgAIDOCX as saved by Microsoft WordText preview and entry list
UEsDB followed by other charactersDOCX from other software (LibreOffice writes UEsDBBQACAgI), or another ZIP-based fileLooks for word/ entries to decide
0M8R4KGxGuELegacy .doc (Word 97–2003), or a password-protected .docxShows “This doesn’t look like DOCX” with the type DOC/XLS/MSG (OLE)
e1xydGYxRTF ({\rtf1)Says it looks like RTF and offers Download as .rtf
JVBERi0PDFSays it looks like PDF and offers Download as .pdf

The OLE case needs one manual step. The tool cannot tell a .doc from an encrypted .docx, so Extension stays docx. For a legacy Word file, type doc there before pressing Download file; for a password-protected document, keep docx and open it in Word with the password. There is no text preview for either.

Where Base64 Word documents come from

Document generation and templating services fill a .docx and return it inside a JSON response. Mail systems carry Word attachments as Base64 MIME parts; the EML decoder opens a whole message and lists its attachments. CRM and ticketing exports often store attachments as Base64 text next to the record. To produce such a string from a file, use Word to Base64.

Decode a DOCX and read its text in Python

The standard library is enough to save the file and print its paragraphs, much like the preview does:

import base64, io, zipfile
import xml.etree.ElementTree as ET

W = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}"

with open("memo.b64") as f:
    docx = base64.b64decode(f.read())

with open("memo.docx", "wb") as f:
    f.write(docx)

with zipfile.ZipFile(io.BytesIO(docx)) as z:
    body = ET.fromstring(z.read("word/document.xml"))

for p in body.iter(W + "p"):
    print("".join(t.text or "" for t in p.iter(W + "t")))

Like the preview, this reads only the main body. For headers, read word/header1.xml the same way. See Base64 in Python for decoding large files in chunks.

FAQ

How do I convert Base64 to a Word document?

Paste the string above and press Download file; the result is saved as decoded.docx, or with the name from the data URI. Rename it in File name first if you like.

Can I edit the document on this page?

No. The page shows the text so you can read it, and the download is the original file, byte for byte. Edit it in Word, LibreOffice Writer or any other program that opens .docx files.

Why does the text of a text box appear twice?

Word saves each text box in two forms, a modern one and a fallback for older readers, and the preview reads the text of both. The document itself contains the box only once.

Where are the headers, footers and comments?

They live in separate parts of the file (word/header1.xml, word/footer1.xml, word/comments.xml). Press View next to one of them in the entry list to read its XML; the text is in the <w:t> elements.