The basics
What is a DOT file?
A DOT file is a Word template from the Word 97 to 2003 era. A template is a starting point: letterheads, memo and report layouts and company style sets were distributed as .dot files, and using one gave you a new, untitled document with a copy of its text, styles and page setup. Word 2007 replaced it with DOTX and DOTM, but current versions of Word still open and use DOT templates, and many organisations still have libraries of them.
Inside, a DOT is a DOC with one bit switched on. The extension is older than this format: earlier Word versions, such as Word 95, also called their templates .dot, and LibreOffice still has an import filter for them.
- It's binary. Text, styles and settings sit in streams inside an OLE2 compound file, not in readable XML.
- It can contain macros under the same extension. Templates were also where Word kept AutoText entries, toolbars and macros shared by many documents.
- Not every
.dotfile is a Word template. Graphviz graph descriptions use.dottoo; see below.
Anatomy
What's inside a DOT file
A DOT file is built exactly like a DOC file: a small file system in one file, with the document in named streams. This is our sample-letter.dot, compared with sample-letter.doc, which LibreOffice saved from the same letter. Of 21,504 bytes, one differs.
$ xxd -l 80 sample-letter.dot (first 80 of the 512 header bytes)
00000000: d0cf 11e0 a1b1 1ae1 0000 0000 0000 0000 ................
00000010: 0000 0000 0000 0000 3b00 0300 feff 0900 ........;.......
00000020: 0600 0000 0000 0000 0000 0000 0100 0000 ................
00000030: 2700 0000 0000 0000 0010 0000 0200 0000 '...............
00000040: 0100 0000 feff ffff 0000 0000 0000 0000 ................
Directory (file size 21,504 bytes = 42 sectors of 512)
Root Entry storage, class 00020906-0000-0000-C000-000000000046
WordDocument 5,701 bytes
1Table 11,217 bytes
\x05SummaryInformation 464 bytes
\x05DocumentSummaryInformation 244 bytes
\x01CompObj 106 bytes "Word.Document.8"
\x01Ole 20 bytes
WordDocument stream, first 16 bytes (the start of the FIB), file offset 0x3800:
.dot ec a5 01 01 4d 20 09 04 00 00 f1 12 bf 00 00 00
.doc ec a5 01 01 4d 20 09 04 00 00 f0 12 bf 00 00 00
^^
$ cmp -l sample-letter.dot sample-letter.doc
14347 361 360- 1
d0cf 11e0 a1b1 1ae1The OLE2 signature
The first 8 bytes of every Compound File Binary file: DOC, DOT, XLS, XLT, PPT and many more. They say "compound file", not "Word template".
- 2
3b00 0300 feff 0900 0600Version and sector sizes
Version 3, little-endian, 512-byte sectors and 64-byte mini sectors, exactly as in a DOC. The DOC page explains the header field by field.
- 3
2700 0000Where the directory starts
At offset 0x30: sector 39, at byte (39 + 1) × 512. The directory lists the streams below.
- 4
Root Entry … 00020906-…The class ID
{00020906-0000-0000-C000-000000000046}, the class registered for Word 97-2003 documents. A template carries the same one. - 5
\x01CompObj … "Word.Document.8"The CompObj stream
Names the program that made the object. Templates say
Word.Document.8too: PRONOM's signature for Word 97-2003 templates looks for that string and then for the template bit. - 6
WordDocument · 1TableThe Word streams
The File Information Block (FIB) and text, then styles, fonts, fields and the piece table. A template stores its styles and boilerplate here like any document.
- 7
ec a5 · 01 01wIdent and nFib
0xA5ECmarks a Word binary file;0x0101is the format version LibreOffice writes. Both are the same in a DOC. - 8
f1 12The flags, and the template bit
Bytes 0x0A–0x0B of the FIB, read as
0x12F1. Bit 0 isfDot: [MS-DOC] says it "specifies whether this is a document template". The DOC has0x12F0. The other set bits are the same in both: bit 9 selects the1Tablestream, bits 4 to 7 count quick saves, bit 12 marks extended characters. - 9
14347 361 360The proof
cmplists every byte that differs: just one, at file offset 14,346 (0x380A), octal 361 (0xF1) against 360 (0xF0). Everything else, including the properties, is identical.
Under the hood
What makes a DOT different from a DOC
The [MS-DOC] specification defines a flag at the start of the File Information Block, the first structure in the WordDocument stream:
| Bit (byte 0x0A) | Name | Meaning, per [MS-DOC] |
|---|---|---|
| 0 | fDot | This is a document template |
| 1 | fGlsy | The file contains only AutoText items (a glossary document) |
| 2 | fComplex | The last save was an incremental (fast) save |
| 8 | fEncrypted | The document is encrypted or obfuscated |
| 9 | fWhichTblStm | Use 1Table rather than 0Table |
In our samples that bit is the only difference: sample-letter.dot and sample-letter.doc differ in exactly one byte. The class ID, the CompObj stream, the MIME type (application/msword) and the document properties are the same. So:
- Signature-based tools have to read the FIB. PRONOM, the UK National Archives' format registry, identifies a Word 97-2003 template by the
Word.Document.8string inCompObjplus that bit set in theWordDocumentstream. - The
filecommand reports both samples as "Composite Document File V2 Document" and can't tell them apart. - Apps may go by the extension. In our tests, LibreOffice opened the DOC renamed to
.dotas a new untitled document and the DOT renamed to.docas an ordinary document: for these binary files it followed the name, not the bit.
In Word
Using DOT templates in current Word and LibreOffice
- Create a document from it: double-click the
.dot, or put it in your templates folder and choose it from File, New, Personal (sometimes labelled Custom) in Word. Word creates a new, untitled document, usually in Compatibility Mode because the template is in the old format. - Edit the template itself: in Word, File, Open the
.dot. Save it back as a DOT only if people on Word 2003 or older still use it; otherwise convert it. - Where templates go: on Windows, Word lists personal templates from
Documents\Custom Office Templates. Microsoft notes that templates from earlier versions of Office can be used after you move them into that folder. - Normal.dot: in Word 97 to 2003 the global template behind every blank document was
Normal.dot. Word 2007 and later useNormal.dotminstead, which the DOTM page covers; an oldNormal.dothas no effect on them. - LibreOffice Writer opens a DOT as a new untitled document and can save one: File, Save As, Word 97–2003 Template.
Documents made from a DOT stay linked to it by its path, as they do with DOTX. When that path points to a server or drive that no longer exists, Word waits for it when the document opens; File, Options, Add-ins, Templates (or Developer, Document Template) lets you attach the document to a template that does exist.
Name clash
Not a Word file? Graphviz .dot files
Graphviz, the open-source graph drawing software, describes graphs in a plain-text language called DOT, and many people save those files as .dot. A Graphviz file is readable text that starts with something like digraph G {; a Word template is binary and starts with the bytes D0 CF 11 E0.
- To tell them apart, open the file in a text editor. Text with
graphordigraphand arrows likea -> bis Graphviz; unreadable characters starting withÐÏare Word. - Graphviz files open with the
dotcommand (dot -Tsvg graph.dot -o graph.svg) or an online Graphviz viewer, not with Word. - Graphviz's maintainers point to
.gv, the extension registered with IANA, partly because Microsoft Word had already claimed.dot. The Graphviz tools don't care about the extension.
Comparison
DOT vs DOTX, DOTM, DOC and OTT
| DOT | DOTX | DOTM | DOC | OTT | |
|---|---|---|---|---|---|
| What it is | Word 97-2003 template | Word template | Word template with macros | Word 97-2003 document | OpenDocument text template |
| Structure | OLE2 binary | ZIP of XML | ZIP of XML | OLE2 binary | ZIP of XML |
| What marks a template | fDot bit in the FIB | Main part content type | Main part content type | (not a template) | mimetype entry |
| Macros | Yes, same extension | No | Yes | Yes | Yes, same extension |
| Open standard | Documented, not a standard | Yes (ISO/IEC 29500) | Yes (ISO/IEC 29500) | Documented, not a standard | Yes (ISO/IEC 26300) |
Convert DOT templates to DOTX when you next edit them, or to DOTM if they really need their macros. That gets you out of Compatibility Mode, and a DOTX can't carry code.
Troubleshooting
Common DOT problems and how to fix them
- Double-clicking opens a new document instead of the template. That's what templates do. To change the template, open it with File, Open in Word.
- I saved over the template by accident. Someone opened it with File, Open, filled it in and saved. Keep a read-only master copy, and check the title bar: a new document is called Document1.
- New documents say Compatibility Mode. They inherit the old format's layout rules from the DOT. Convert the template: open it with File, Open and save it as Word Template (*.dotx). Existing documents can be converted with File, Info, Convert.
- Word blocks the file. Office's Trust Center can block Word 97-2003 templates as an old file type (File, Options, Trust Center, File Block Settings), often by company policy.
- Word won't open it at all, or shows text like
digraph G {. It's probably a Graphviz file, not a Word template. - Macros in the template don't run. Office blocks macros in files from the internet, and Trust Center settings may disable them. That's deliberate; only unblock a template you trust.
How to
How to open and convert a DOT file
- Convert to DOTX in Word: File, Open the
.dot, then File, Save As, **Word Template (*.dotx), or Word Macro-Enabled Template (*.dotm)** to keep its macros. - Convert with LibreOffice:
soffice --headless --convert-to 'dotx:MS Word 2007 XML Template' old.dot, or--convert-to docxfor an ordinary document. To write a DOT:soffice --headless --convert-to 'dot:MS Word 97 Vorlage' letter.docx. - Google Docs converts an uploaded DOT into an ordinary Google Doc; macros are dropped.
- Look inside: Python's
olefilelists the streams, and reading byte 0x0A of theWordDocumentstream tells you whether the template bit is set:ole.openstream('WordDocument').read(12)[10] & 1. - In a browser: browsers can't display DOT files, so a link to one downloads it.
Security
Is a DOT file safe? Templates and macro viruses
Templates were the engine of the macro viruses of the late 1990s. Because every new document was based on Normal.dot, a virus that copied itself into that template got into every document the user created afterwards. CERT's 1999 advisory on Melissa describes exactly this: the macro "infects the Normal.dot template file", so "any newly created Word document will be infected".
- A DOT can hold VBA macros without any sign in its name. Unlike a DOTX, the extension doesn't tell you.
- Auto macros such as
AutoNew(runs when a document is created from the template) andAutoOpenrun as soon as macros are allowed. - Office's blocking of macros in files from the internet applies to templates too; the DOC page explains it.
- Global templates and the Startup folder load automatically with Word; an unexpected DOT there deserves a look.
Don't enable macros in a template you didn't expect. If a DOT only needs text and styles, convert it to DOTX, which can't carry code. Our samples contain no macros.
Free downloads
Sample DOT files to download
Free sample Word 97-2003 templates for testing file-type detection, converters and old-template handling. LibreOffice 24.2 wrote them with its Word 97–2003 template filter from documents made with python-docx; all were checked with olefile and converted to PDF. None contains macros.
Browsers can't show this kind of file in a page. Download it to open it in the app it belongs to.
What's inside sample-letter.dot
Browsers can't preview DOT files, so download it and double-click it: Word or LibreOffice creates a new, untitled letter from it. These are the parts to look for.
The template bit
fDotis set at byte 0x0A of theWordDocumentstream (file offset 0x380A). It's the only byte that differs fromsample-letter.doc.Named styles
Sender Name, Sender Details, Recipient Address, Letter Date, Subject Line, Closing and Signature Name, stored in the style sheet in the
1Tablestream.Placeholders
Bracketed text such as
[Recipient name]in a shaded character style, ready to type over.A date field
A DATE field formatted
d MMMM yyyy, which shows the current date in each new letter, for example "27 October 2026".Header and footer
The sender block in the header and a PAGE field in the footer.
Document properties
Title "Letter template", subject, keywords and the comment "Free sample from 99helpers.com/file-types/dot", in the
\x05SummaryInformationstream.
All sample DOT files
Letter template
sample-letter.dot · 21 KB (21,504 bytes)
A one-page A4 business letter template for a fictional studio: custom styles, shaded placeholders, a DATE field, a sender block in the header and a page number in the footer.
- Checking that an app creates a new document from a DOT
- Testing detection of the template bit
The same letter as a DOC
sample-letter.doc · 21 KB (21,504 bytes)
Saved from the same document with LibreOffice's Word 97–2003 filter. It differs from the DOT in one byte: the flags at 0x380A read
F0instead ofF1.- Comparing a template with a document byte for byte
- Testing code that must tell DOT from DOC
Report template
sample-report.dot · 28.5 KB (29,184 bytes)
A two-page report template with Heading 1 to 3 styles, a filled-in table of contents, a cover block with placeholders, a table with a numbered caption and PAGE of NUMPAGES in the footer.
- Testing conversion of old templates to DOTX or PDF
- Checking heading styles and the TOC survive
Ways to test with them
- Template detection: read byte 0x0A of the
WordDocumentstream in each file. It'sF1in both DOT files andF0in the DOC; a detector that only checks the first bytes or theCompObjstream sees three identical Word files. - Extension vs content: rename
sample-letter.docto.dotand the reverse, then open them in the app you're testing to see whether it follows the name or the bit. - New document, not the file: opening
sample-letter.dotshould give an untitled document; an app that saves over the template has a bug. - Conversion: convert
sample-report.dotto DOTX, DOCX or PDF and check the heading styles, the table of contents and the page numbers. - Upload filters: all three share the MIME type
application/msword. A filter that blocks DOT but allows DOC has to look at the extension or the FIB.
Free to use for testing, teaching and demos, commercially or not, with no attribution needed. A link back to this page is always appreciated.
Put it online
Have a DOT file? Give it a link.
Drop a Word 97-2003 template on 99helpers and it gets its own link. Browsers can't display DOT files, so visitors download it and open it in Word or LibreOffice, which create a new document from it.
Questions
DOT files, frequently asked
What is a DOT file?
Usually a Microsoft Word 97-2003 template: a binary file that new documents are based on. Less often, a Graphviz graph description in plain text.
What's the difference between DOT and DOC?
One bit. Both use the same binary format; a DOT has the fDot flag set in its File Information Block, and Word opens it as a template, creating a new document from it.
What's the difference between DOT and DOTX?
DOT is the binary template format of Word 97 to 2003 and can contain macros. DOTX is the XML-based template format of Word 2007 and later and can't; macro templates use DOTM.
How do I open a DOT file?
Double-click it to create a new document from it in Word or LibreOffice Writer. To edit the template itself, use File, Open inside Word.
How do I convert a DOT to DOTX?
Open it in Word with File, Open, then File, Save As and choose Word Template (*.dotx). With LibreOffice: soffice --headless --convert-to 'dotx:MS Word 2007 XML Template' file.dot.
Is my .dot file a Graphviz file?
Open it in a text editor. If you see readable text like digraph G {, it's Graphviz; render it with dot -Tsvg. If it's binary, it's a Word template.
Can a DOT file contain a virus?
Yes. A DOT can hold VBA macros, and macro viruses spread by infecting the global template Normal.dot. Don't enable macros in templates you didn't expect.
What MIME type does a DOT file have?
application/msword, the same as a DOC file. The MIME type alone doesn't tell you it's a template.
Related formats
Other file types explained
Keep going
Related
Sources
- Microsoft: [MS-DOC] FibBase (fDot, fGlsy, wIdent)
- The National Archives (PRONOM): Microsoft Word Document Template 97-2003
- The National Archives (PRONOM): Word Document Template 97-2003, password protected
- Microsoft Support: Create a template
- CERT Advisory CA-1999-04: Melissa Macro Virus
- Graphviz forum: What is the file extension for dot files?
Last reviewed 27 October 2026.