What is a .doc file?
Microsoft Word 97-2003 Document · Document · Microsoft · 1997
DOC is the classic Microsoft Word format used until 2007, before DOCX. It is a binary OLE2 compound file that stores formatted text, images and layout. Word still opens it, but modern documents use DOCX.
What is a .doc file used for?
A .doc file is a compound file: a mini filesystem holding the document's text, formatting and embedded objects. It shares the OLE2 signature D0 CF 11 E0 with old Excel and PowerPoint files, so the extension, not the header, tells them apart.
Word 2007 replaced DOC with the XML-based DOCX, which is smaller and less prone to corruption. Word, LibreOffice and Google Docs all still open .doc, and can save it back to DOCX.
How to open a .doc file
The .doc format opens in the following apps, grouped by operating system. If one app does not work, try another from the same list. For a step-by-step walkthrough, see how to open a .doc file.
Windows
- Microsoft Word
- LibreOffice Writer
- WPS Office
macOS
- Microsoft Word
- Pages
- LibreOffice Writer
Linux
- LibreOffice Writer
- OnlyOffice
Web
- Google Docs
- Microsoft 365 for the web
How to convert a .doc file
You can convert a .doc file to docx, pdf, odt, txt using a conversion tool or the export menu of an app that opens it.
.doc file signature (magic bytes)
Programs recognise a .doc file by the bytes at the start of the file, not by its name. These are the signatures for DOC. For a full breakdown, see the DOC file signature page.
| Hex signature | Offset | Note |
|---|---|---|
| D0 CF 11 E0 A1 B1 1A E1 | 0 | OLE2 compound file |
See the full magic-numbers reference for every format.
Frequently asked questions
What is a .doc file?
DOC is the classic Microsoft Word format used until 2007, before DOCX. It is a binary OLE2 compound file that stores formatted text, images and layout. Word still opens it, but modern documents use DOCX.
What is the difference between DOC and DOCX?
DOC is the older binary format (Word 97-2003). DOCX, from Word 2007 on, is a ZIP of XML: smaller, more robust and the current standard. Word opens both.
How do I open a .doc file?
Microsoft Word, LibreOffice Writer, Google Docs and Pages all open .doc. Any of them can also save it as the newer DOCX or as PDF.
Are .doc files safe to open?
Generally yes, but they can contain macros that run code. Keep macros disabled (the default) and only enable them for documents you trust.
Related formats
Sources
Details on this page were checked against authoritative references: