Quick Word solution — step-by-step + free template. Speed it up with the GenText AI Word add-in.

Install Free →

DOCX, DOC, DOCM, DOTX, RTF: Word File Formats Explained (2026)

By Priya Patel May 14, 2025 Updated May 19, 2026 word-tutorial
Share

Quick Answer

DOCX is the default modern Word format — XML-based, smaller files, opens in any modern Word (since 2007), Google Docs, LibreOffice, Pages. DOC is the legacy binary format used by Word 97-2003 — avoid for new documents but still works for backwards compatibility. DOCM is DOCX with macros enabled (security risk — only open from trusted sources). DOTX/DOTM are templates. RTF is plain-text-with-formatting — universal but loses advanced features like comments, tracked changes, and embedded objects.

Quick Comparison Table

FormatExtensionWord versionBest forAvoid for
DOCX.docx2007+Everyday documentsSending to Word 2003 users
DOC.doc97-2003Backwards compatibility onlyAnything new
DOCM.docm2007+Documents with macrosSharing externally (security warnings)
DOTX.dotx2007+TemplatesOne-off documents
DOTM.dotm2007+Templates with macrosUntrusted sources
RTF.rtfAllMaximum cross-app compatibilityModern Word documents (3-5× larger)
PDF.pdfAll (via Export)Final/locked deliverablesDocuments that need editing
TXT.txtAllPlain text onlyAnything with formatting

What Each Format Actually Is

DOCX — the default

.docx is a ZIP archive containing XML files. If you rename a .docx to .zip and extract it, you’ll see folders like word/, _rels/, and docProps/ containing the text, formatting, and metadata as separate XML files. This structure is why DOCX is smaller (XML compresses well), more recoverable (a corrupted image doesn’t take down the document text), and easier for third-party apps to parse.

Use DOCX for: every new document, unless you specifically need one of the formats below.

DOC — the legacy binary

.doc is the binary format Microsoft used from Word 97 through Word 2003. It’s a single binary blob — efficient at the time, but harder to recover when corrupted and harder for non-Microsoft apps to read perfectly. Modern Word still opens .doc files, but you’ll see “Compatibility Mode” at the top of the window, indicating some features are disabled.

Use DOC only when: you must send to someone running Word 2003 or older. Otherwise convert to DOCX immediately.

DOCM — macros enabled

.docm is structurally identical to .docx, but with one crucial difference: it can contain VBA (Visual Basic for Applications) macros that execute when the document opens. Macros are powerful — they can automate workflows that would take hours manually — but they can also do anything VBA can do, including delete files, send emails, modify the registry, or download additional malware.

When you open a .docm, Word shows a yellow “PROTECTED VIEW” or “Enable Content” warning bar. Never click “Enable Content” unless you know exactly what the macros do and trust the sender. Macro-borne attacks (Emotet, Dridex, Qakbot families) have been the dominant Office malware vector for years.

Use DOCM for: internal automation where you control all senders and recipients. Avoid for external sharing.

DOTX / DOTM — templates

.dotx is the template version of .docx. When you double-click a .dotx, Word creates a new document based on it instead of opening the template itself. This prevents accidentally overwriting your template. .dotm is the same idea but with macros enabled.

Use DOTX for: letterhead, invoices, report templates, anything you’ll create many copies of with the same starting structure.

RTF — the universal fallback

Rich Text Format dates to 1987. It’s plain text with embedded formatting codes. RTF preserves: text, fonts, colors, bold/italic/underline, basic paragraph styles, basic tables. RTF loses: comments, tracked changes, embedded objects, advanced layouts, footnotes with cross-references, OLE objects.

Almost every text editor on every operating system can read RTF — that’s its appeal. The downsides are file size (often 3-5× larger than DOCX) and feature loss.

Use RTF only for: maximum compatibility with old or specialized software. Otherwise DOCX is better.

How to Convert Between Formats

.doc → .docx

In Word: open the .doc → File → Info → Convert (button below the file name) → click OK when prompted. The file converts in place and reloads. Alternative: File → Save As → choose Word Document (*.docx) from the format dropdown.

.docx → .doc (rare but sometimes needed)

File → Save As → choose Word 97-2003 Document (*.doc). Word warns you that some formatting may not survive — usually safe for plain documents, may corrupt newer features like SmartArt or content controls.

.docx → .pdf

File → Save As → PDF (*.pdf) OR File → Export → Create PDF/XPS. The Export method preserves hyperlinks, bookmarks, and TOC links; the Save As method does the same in modern Word. Avoid File → Print → Microsoft Print to PDF — that flattens hyperlinks. More on this here.

.docx → .txt (strip all formatting)

File → Save As → Plain Text (*.txt). You’ll lose all formatting, images, and tables. Useful for pasting clean text into a system that doesn’t accept Word documents (some web forms, code editors).

Bulk conversion (.doc → .docx for hundreds of files)

In Word, View → Macros → Create, paste this VBA snippet, hit Run:

Sub ConvertDocsInFolder()
    Dim folderPath As String
    folderPath = "C:\Path\To\Your\Folder\"
    Dim file As String
    file = Dir(folderPath & "*.doc")
    Do While file <> ""
        If LCase(Right(file, 4)) = ".doc" Then
            Documents.Open folderPath & file
            ActiveDocument.SaveAs2 _
                FileName:=folderPath & Replace(file, ".doc", ".docx"), _
                FileFormat:=wdFormatXMLDocument
            ActiveDocument.Close
        End If
        file = Dir
    Loop
End Sub

Change the folder path to your actual folder. Run once.

”My Word File Won’t Open” — Quick Triage

If you got a Word file that won’t open, the format usually tells you what’s wrong:

  • .doc that won’t open in modern Word: try File → Open → Browse, change file type filter to “All Files,” select the .doc. If that fails, try opening it in LibreOffice or Google Docs — they’re sometimes more forgiving of corruption.
  • .docx that opens as gibberish: it may have been renamed from a different format. Rename it to .zip and try to extract — if it extracts and contains word/document.xml, it’s a real DOCX. If extraction fails, it’s mislabeled.
  • .docm that triggers virus warnings: don’t bypass the warnings. Open in Word’s Protected View, copy the text you need into a new blank document, save as .docx. The macros never execute.
  • .rtf that looks weird: RTF files saved by some non-Microsoft apps use non-standard extensions. Try opening in WordPad (Windows) or TextEdit (Mac) first to verify it’s actually RTF.

For format-specific recovery, see How to Recover an Unsaved Word Document and Word to PDF Hyperlinks Not Working.

Frequently Asked Questions

What is a .docx file?

A DOCX file is a Microsoft Word document in the modern XML-based format introduced with Word 2007. It's actually a ZIP archive containing XML files for text, formatting, embedded images, and metadata — you can rename a .docx to .zip and unzip it to see the structure. DOCX files are smaller than the older .doc format, more recoverable when corrupted, and open natively in Microsoft Word, Google Docs, Apple Pages, LibreOffice Writer, and most modern word processors.

What's the difference between DOC and DOCX?

DOC is the legacy binary format from Word 97-2003. DOCX is the XML-based format from Word 2007 onwards. Practical differences: DOCX files are typically 25-75% smaller, more resilient to corruption (one bad image won't destroy the whole document), and support newer features like SmartArt, ribbon controls, and content controls. DOC files are slightly more compatible with very old software but are otherwise inferior. For any new document, use DOCX.

What's a .docm file? Is it safe to open?

DOCM is a DOCX file with macros enabled. Macros are small VBA programs that can automate tasks — but they can also run malicious code (delete files, steal data, install malware). Only open .docm files from trusted sources. When you open one, Word shows a yellow security warning bar: 'Enable Content' actually enables the macros. If you don't recognize the sender or weren't expecting a macro-enabled document, click 'Disable.'

What about .dotx and .dotm?

These are Word templates. .dotx is the modern template format (creates a new document based on the template each time you open it, instead of overwriting). .dotm is a template with macros. Use these for documents you'll create many copies of (letterhead, invoices, report templates).

When should I use RTF?

Use RTF (Rich Text Format) only when you need maximum compatibility — for example, sending a document to someone using very old or specialized software that doesn't support DOCX. RTF preserves basic formatting (fonts, colors, bold/italic, basic tables) but loses advanced features: comments, tracked changes, embedded objects, footnotes-with-cross-references, and complex layouts. RTF files are also much larger than DOCX (often 3-5×). For modern use, DOCX is almost always better.

How do I convert .doc to .docx?

Open the .doc in Word → File → Info → Convert (button near the top). Word converts it in place to .docx and reloads the document. Or: File → Save As → choose 'Word Document (.docx)' from the format dropdown. Bulk conversion: copy all your .doc files to a folder, then run a small Word VBA macro that loops through and saves each as .docx — search 'Word VBA convert doc to docx' for one-line scripts.

What's the difference between DOCX and PDF?

DOCX is editable (you can change the text); PDF is locked (designed for viewing/printing only — though paid Adobe Acrobat can edit PDFs with limits). Use DOCX when you want recipients to edit or comment. Use PDF when you want the layout preserved across all readers and devices (resumes, contracts, finished reports). Word can export both: File → Save As → choose DOCX or PDF.

Can DOCX files be opened on a Mac or Linux?

Yes. macOS: opens in Microsoft Word for Mac, Apple Pages, LibreOffice, or Google Docs (via browser). Linux: opens in LibreOffice Writer, OnlyOffice, or Google Docs. iOS/Android: Microsoft Word mobile app (free for editing on devices ≤10.1"), Google Docs, or Pages. ChromeOS: Word Online or Google Docs. The DOCX standard is well-supported across all major operating systems.

Related Guides

Free Citation Cheat Sheet (PDF)

APA, MLA, Chicago, Harvard, IEEE — every common style on one printable page. Plus our weekly research-writing tips.

No spam. Unsubscribe in one click. Privacy.

Work Smarter in Microsoft Word

GenText is a free AI-powered Word Add-in that helps you draft, edit, and format documents faster. Install in seconds.

Install Free
Share
word-tutorial file-format docx doc docm compatibility