.doc

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.

Category
Document
Type
Binary
Is a .doc file safe to open? Mostly safe, but old .doc files can carry macros (VBA) that run code. Open unexpected documents with macros disabled, which is the default in modern Word.

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.

What opens 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.

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

Open a .doc file step by step

  1. Confirm the file really is a .doc. Drop it into the WhatFileType identifier, which reads its signature in your browser without uploading anything.
  2. On Windows, open it with Microsoft Word or LibreOffice Writer.
  3. On Mac, use Microsoft Word or Pages.
  4. On Linux, try LibreOffice Writer or OnlyOffice.
  5. Still stuck? Convert the .doc to docx, which opens more widely.

Why can't I open my .doc file?

Almost always because no installed app understands DOC. Install one of the apps above, or convert the file to a format your existing software already reads. If double-clicking opens the wrong program instead of nothing at all, the file association is set to the wrong app rather than the file being broken.

The other possibility is that the file is not really a .doc at all. Drop it into the file identifier to check it by its bytes instead of its name. Nothing is uploaded.

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.

What is the .doc file signature (magic bytes)?

A .doc file starts with the hex bytes D0 CF 11 E0 A1 B1 1A E1. Programs identify DOC by those bytes, not by the filename, so a renamed file still gives itself away.

These are the documented signatures for DOC. For a full breakdown, see the OLE2 Compound File file signature page.

Documented magic-byte signatures for the .doc format
Hex signatureOffsetASCIINote
D0 CF 11 E0 A1 B1 1A E10-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. How sources are ranked and what is deliberately left out is set out in the methodology.