Fix Microsoft Word DOCX Files Opening in a Text Editor or Showing Code
Question details
The user needs downloaded DOCX documents to display readable document content in Microsoft Word instead of opening in a text editor or showing code.
- Product
- Microsoft Word / Word for Microsoft 365
- Device & OS
- not provided
- Scenario
- Opening DOCX documents downloaded from the internet, including documents exported by writing software.
- Observed behavior
- Downloaded DOCX files open in a text editor described as Note, or display document code rather than formatted Word content.
Locate a downloaded file and confirm that its extension is .docx; on Windows, enable File name extensions from File Explorer's View menu if necessary. Only unblock or open downloaded documents from sources you trust.
Open the DOCX file directly in Word and check its default app
Use this first when double-clicking a DOCX file launches a text editor instead of Microsoft Word.
Start Microsoft Word, select File > Open > Browse, and choose the downloaded DOCX file. If it displays correctly, the file is readable and its default opening app may be incorrect.
On Windows, right-click the DOCX file in File Explorer and select Open with > Choose another app. Select Microsoft Word and choose Always or the option to always use this app for .docx files, depending on your Windows version.
Close the document and double-click the DOCX file in File Explorer. It should now launch Word rather than the text editor.

Unblock a trusted downloaded DOCX file in Windows
Use this when Word blocks or restricts a document downloaded from the internet. Unblocking does not correct an incorrect default app.
Verify the DOCX format or use a DOC export workaround
Use this when Word itself displays code, reports an invalid file, or cannot open a document exported by another application.
Open and Edit Word Documents with WPS Writer
WPS Office is a free, lightweight alternative with a familiar interface and support for Microsoft Word formats. Use WPS Writer to open valid DOCX downloads and continue editing existing documents with minimal workflow changes; it does not repair Microsoft Word settings or guarantee recovery of invalid files.

Frequently Asked Questions
Why do my DOCX downloads open in a text editor?
The .docx extension may be associated with a text editor rather than Word. On Windows, right-click a DOCX file, select Open with > Choose another app, choose Microsoft Word, and set it as the app to always use for .docx files.
What if the file still shows code when I open it from Word?
If File > Open > Browse in Word still displays code, the download may not contain a valid DOCX document. Download it again or use the source application's Export or Save As command to create a genuine Word document. Changing the filename extension is not a conversion.
Where is the Unblock option for a downloaded document?
On Windows, right-click the file in File Explorer and select Properties > General. If Windows has marked the file as downloaded from another computer, an Unblock option may appear near the bottom. Use it only for a trusted file; if it is absent, there is nothing to unblock there.
Can saving as DOC and then DOCX resolve the problem?
It can help if the original application's DOCX export is problematic but its DOC export is valid. Export as .doc from that application, open it in Word, then use File > Save As to save as Word Document (*.docx). Review the result because conversion through DOC can change formatting.
Can WPS Writer open the downloaded DOCX instead?
WPS Writer can open valid Microsoft Word .docx files. Launch WPS Writer, select Menu > Open, and choose the downloaded document. It is an alternative editor, not a fix for Word's default-app settings or a guarantee that an invalid file will open.




