The basics
What is an OTT file?
An OTT file is a template for LibreOffice Writer and other OpenDocument word processors. Letterheads, report layouts, fax and memo forms and company style sets are distributed as OTT files. Open one and LibreOffice doesn't open the file itself: it creates a new document called Untitled 1 with a copy of the template's text, styles, page layout, headers and footers, and the template stays unchanged.
Inside, an OTT is built exactly like an ODT: XML files in a ZIP package, defined by the OpenDocument standard (OASIS, ISO/IEC 26300). Each ODF document type has a template twin:
| Document | Template | Template MIME type |
|---|---|---|
| `.odt` text | .ott | application/vnd.oasis.opendocument.text-template |
| `.ods` spreadsheet | .ots | application/vnd.oasis.opendocument.spreadsheet-template |
| `.odp` presentation | .otp | application/vnd.oasis.opendocument.presentation-template |
.odg drawing | .otg | application/vnd.oasis.opendocument.graphics-template |
Anatomy
What's inside an OTT file
Rename an .ott to .zip and you can open it like any archive. Our sample-minimal.ott holds only the three entries LibreOffice needs, written by hand. Compare it with the minimal ODT: two strings differ.
$ unzip -l sample-minimal.ott
Length Date Time Name
--------- ---------- ----- ----
48 2026-10-27 12:00 mimetype
520 2026-10-27 12:00 content.xml
414 2026-10-27 12:00 META-INF/manifest.xml
Bytes 0-85: 50 4B 03 04 … "mimetype"
"application/vnd.oasis.opendocument.text-template"
content.xml:
<?xml version="1.0" encoding="UTF-8"?>
<office:document-content
xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
office:version="1.3">
<office:body>
<office:text>
<text:h text:outline-level="1"><text:placeholder
text:placeholder-type="text"><Your heading></text:placeholder></text:h>
<text:p>Sample OTT from 99helpers.com/file-types/ott</text:p>
</office:text>
</office:body>
</office:document-content>
META-INF/manifest.xml (the two entries):
<manifest:file-entry manifest:full-path="/" manifest:version="1.3"
manifest:media-type="application/vnd.oasis.opendocument.text-template"/>
<manifest:file-entry manifest:full-path="content.xml"
manifest:media-type="text/xml"/>- 1
50 4B 03 04The ZIP signature
Every OTT is a ZIP file, like every ODT, so the first four bytes don't reveal it's a template.
- 2
mimetypeThe mimetype entry
The first entry in the package, stored uncompressed and without an extra field, so its content sits at a fixed place: the name at byte 30, the type at byte 38.
- 3
application/vnd.oasis.opendocument.text-templateThe template's type
48 characters, no line break. In an ODT this reads
application/vnd.oasis.opendocument.text. Detectors such asfileread it, which is whyfilereports "OpenDocument Text Template" for an OTT. - 4
content.xmlThe template's content
The text new documents start with. The XML vocabulary is the same as in an ODT: there are no template-only elements in the body.
- 5
<office:text>A text document
office:textmarks word-processing content, as in an ODT. A spreadsheet template (.ots) hasoffice:spreadsheethere. - 6
<text:placeholder text:placeholder-type="text">A placeholder field
ODF's own click-to-fill field. LibreOffice shows it shaded; one click selects it all, and typing replaces it. The
<and>around the text are only a convention. - 7
manifest:full-path="/"The manifest's root entry
Repeats the package's type. In a valid file it matches the
mimetypeentry:…text-templatehere. - 8
(no styles.xml, meta.xml)What a real template adds
Named styles and page layouts in
styles.xml, metadata inmeta.xml, settings and a thumbnail. Oursample-letter.otthas them all.
Under the hood
What makes an OTT different from an ODT
Two strings: the content of the mimetype entry and the media type of the manifest's root entry. We saved our sample letter from LibreOffice both ways; here is everything that differs between sample-letter.ott and sample-letter.odt:
| Entry | In the OTT | In the ODT |
|---|---|---|
mimetype | …opendocument.text-template | …opendocument.text |
META-INF/manifest.xml, root entry | …opendocument.text-template | …opendocument.text |
settings.xml | A different random Rsid value, which LibreOffice uses to track edit sessions | |
content.xml, styles.xml, meta.xml, thumbnail | Identical | Identical |
Because the type is inside the package, LibreOffice goes by it, not by the name. In our tests, the OTT renamed to .odt still opened as a new untitled document, and the ODT renamed to .ott opened as an ordinary document. To turn one into the other, save it again in the other format.
A document can remember the template it was made from: ODF has a meta:template element in meta.xml for the template's title, address and date, and LibreOffice shows the name under File, Properties, General. For a document linked to a template this way, LibreOffice can offer to update the document's styles when the template has changed.
In LibreOffice
Making and using templates in LibreOffice
- Make a template: set up a document, then File, Templates, Save as Template. Give it a name, pick a category, and LibreOffice stores it in your templates folder. Or use File, Save As with the type ODF Text Document Template (.ott) and save it anywhere.
- Use a template: File, New, Templates (or Ctrl+Shift+N) opens the Template Manager; double-click a template to create a document. Double-clicking an
.ottin your file manager does the same. - Edit a template: in the Template Manager, right-click it and choose Edit. Opening the
.ottthe normal way only creates a new document. - Change the default: right-click a template in the Template Manager and choose Set as Default. Every new Writer document then starts from it, the role
Normal.dotmplays in Word. - Where templates live: in your LibreOffice user profile; Tools, Options, LibreOffice, Paths, Templates shows the folders. The Template Manager's Import button copies an
.ottfrom elsewhere into them.
Template features
Placeholders, fields and styles: what makes a good OTT
- Placeholders (Insert, Field, More Fields, Functions, Placeholder) mark what to fill in. They're
text:placeholderelements in the XML, shown shaded on screen. LibreOffice doesn't print them: when we exportedsample-letter.ottto PDF, the placeholders were left out and only the fixed text appeared. - Fields fill themselves in: a date field shows the current date in each new document, page number and page count fields go in footers, and document properties such as the title can be shown as fields.
- Named styles in
styles.xmlcarry the design. A template whose text all uses styles, rather than direct formatting, is easy to restyle and converts more cleanly to Word. - Page styles hold the page size, margins, header and footer, so a letter template can have a different first page from the pages that follow.
In Word terms
LibreOffice placeholders do the job of Word's content controls and bracketed prompts. When LibreOffice saves a template as DOTX, test it in Word: fields and styles usually survive, while placeholders and other LibreOffice-specific features may change.
Comparison
OTT vs DOTX, DOTM, DOT and ODT
| OTT | DOTX | DOTM | DOT | ODT | |
|---|---|---|---|---|---|
| What it is | ODF text template | Word template | Word template with macros | Word 97-2003 template | ODF text document |
| Native app | LibreOffice Writer | Microsoft Word | Microsoft Word | Word 97-2003 | LibreOffice Writer |
| Structure | ZIP of XML | ZIP of XML | ZIP of XML | OLE2 binary | ZIP of XML |
| What marks a template | mimetype entry | Main part content type | Main part content type | fDot bit | (not a template) |
| Macros | Yes, same extension | No | Yes | Yes, same extension | Yes, same extension |
Use OTT when the people using the template work in LibreOffice, and DOTX when they work in Word. Each app handles its own template format best; a template is worth testing in the app that will use it.
How to
How to open and convert an OTT file
- LibreOffice Writer (free; Windows, macOS, Linux) opens OTT files natively, as do Apache OpenOffice and other ODF word processors.
- To a document: open the template (which creates Untitled 1) and save it as ODT, or run
soffice --headless --convert-to odt letter.ott. - To a Word template: File, Save As, Word 2007 Template (.dotx) in LibreOffice 24.2, or
soffice --headless --convert-to 'dotx:MS Word 2007 XML Template' letter.ott. - From a document:
soffice --headless --convert-to 'ott:writer8_template' letter.odt(or from a DOCX). - Microsoft Word and Google Docs work with ODT documents. For a template, the dependable route is to create a document from it in LibreOffice and send that as ODT or DOCX, or convert the template to DOTX.
- In a browser: browsers can't display OTT files, so a link to one downloads it.
Troubleshooting
Common OTT problems and how to fix them
- Opening the template gives Untitled 1. That's how templates work. To change the template itself, use Edit in the Template Manager.
- I filled in the template and saved over it. Probably by choosing Save As and the template type again. Keep a master copy, and save filled-in documents as ODT.
- My template isn't in the Template Manager. It's not in a templates folder. Use Import in the Template Manager, or Save as Template.
- The placeholders vanished when I printed. LibreOffice doesn't print placeholders that haven't been filled in. Replace them with text before printing or exporting a PDF.
- "The file is corrupt" after editing the ZIP by hand. The
mimetypeentry must be first and uncompressed. With Info-ZIP:zip -X0 new.ott mimetypethenzip -Xr new.ott . -x mimetype. - It downloads as a ZIP or opens as the wrong type. The server sends
application/zip. Serve.ottasapplication/vnd.oasis.opendocument.text-template.
Security
Is an OTT file safe to open?
Like ODT, an OTT has no separate macro-free extension: any .ott can contain LibreOffice Basic or other scripts in a Basic/ or Scripts/ folder, and documents made from it can carry them on. LibreOffice's default macro security runs only macros signed by a trusted source or stored in a trusted location. Don't lower it because a template asks you to.
- Metadata travels. A document linked to its template stores the template's address in
meta.xml. A path likeC:\Users\name\Templates\Offer.ottcan reveal a user name or folder structure. - Links and fields in the template are copied into every document made from it.
- Keep LibreOffice updated: template files are parsed by the same code as documents.
Free downloads
Sample OTT files to download
Free sample OpenDocument text templates for testing uploads, file-type detection, converters and template handling. The letter was written with odfpy and the report with python-docx, then both were saved by LibreOffice 24.2. All were checked with unzip -t, odfpy and a LibreOffice export 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.ott
Browsers can't preview OTT files, so download it and open it in LibreOffice Writer: you get Untitled 1, a new letter based on it. These are the parts to look for.
Named paragraph styles
Sender Name, Sender Details, Recipient Address, Letter Date, Subject Line, Closing and Signature Name, all in
styles.xml, so the Styles sidebar lists them.Placeholder fields
Eleven
text:placeholderfields such as<Recipient name>and<Your name>: click one and type to replace it. They don't print until you fill them in.A date field
A
text:datefield with a long date format ("27 October 2026"). It isn't fixed, so each new letter shows the current date.Page style with header and footer
The Default page style has A4 paper, the sender block in its header and a page number field in its footer.
Metadata
Title "Letter template", subject, keywords and the description "Free sample from 99helpers.com/file-types/ott" in
meta.xml.The template type
application/vnd.oasis.opendocument.text-templatein themimetypeentry and the manifest. Apart from a random session ID, that's all that separates it fromsample-letter.odt.
All sample OTT files
Letter template
sample-letter.ott · 15.8 KB (16,203 bytes)
A one-page A4 business letter template for a fictional studio: named styles, eleven placeholder fields, a date field, and a page style with the sender block in the header and a page number in the footer.
- Checking that an app creates a new document from a template
- Testing placeholders in conversion and printing
The same letter as an ODT
sample-letter.odt · 15.8 KB (16,190 bytes)
Saved by LibreOffice from the same source as the OTT. Only the
mimetypeentry, the manifest's root entry and a session ID insettings.xmldiffer.- Comparing a template with a document
- Testing code that must tell OTT from ODT
Report template
sample-report.ott · 27.0 KB (27,663 bytes)
A two-page report template with Heading 1 to 3 styles, a generated table of contents, a cover block, a table with a numbered caption and page X of Y in the footer. Built as a DOCX and converted by LibreOffice.
- Testing heading styles and a table of contents in templates
- Converting a template to DOTX or PDF
Minimal OTT, three entries
sample-minimal.ott · 827 bytes
Only
mimetype,content.xmlandMETA-INF/manifest.xml, written by hand, with one placeholder field. It's the file shown in the anatomy above.- Parser tests: don't assume optional parts exist
- Checking detection by the mimetype entry
Ways to test with them
- File type detection: all four start with
PKand havemimetypeat byte 30. Read 48 bytes from byte 38: the three OTT files say…text-template, the ODT says…textfollowed by other data. - New document, not the file: opening
sample-letter.ottshould give an untitled document. An app that opens and saves over the template has a bug. - Placeholders: export
sample-letter.ottto PDF or DOCX and see what your converter does with the eleven placeholder fields: drop them, keep their text or keep them as fields. - Conversion: convert
sample-report.ottto DOTX and check the heading styles, the table of contents and the page fields in Word. - Defensive parsing:
sample-minimal.otthas nostyles.xmlormeta.xml. Code that assumes they exist will fail on it.
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 an OTT file? Give it a link.
Drop a LibreOffice template on 99helpers and it gets its own link, ready to share with your team. Browsers can't display OTT files, so visitors download it and open it in LibreOffice Writer, which starts a new document from it.
Questions
OTT files, frequently asked
What is an OTT file?
An OpenDocument text template, the template format of LibreOffice Writer. Opening it creates a new, untitled document with the template's text, styles and layout.
What's the difference between OTT and ODT?
Inside, only the type in the mimetype entry and the manifest: …text-template instead of …text. In use, an ODT opens itself, while an OTT starts a new document.
How do I open an OTT file?
With LibreOffice Writer or another ODF word processor such as Apache OpenOffice. Double-clicking it creates a new document from it.
How do I edit an OTT template?
In LibreOffice, open File, Templates, Manage Templates, right-click the template and choose Edit. Make the changes and save.
How do I convert an OTT to DOTX or DOCX?
In LibreOffice, save it as Word 2007 Template (.dotx) or create a document from it and save that as DOCX. On a server: soffice --headless --convert-to docx file.ott.
How do I make a template the default in LibreOffice?
Open the Template Manager (File, New, Templates), right-click the template and choose Set as Default. New Writer documents then start from it.
Why don't my placeholders print?
LibreOffice leaves placeholder fields out of printouts and PDF exports until you fill them in. Click each one and type your text first.
Can an OTT file contain macros?
Yes. OTT has no separate macro-free extension. LibreOffice blocks unsigned macros by default; keep that setting for templates you didn't make.
Related formats
Other file types explained
Keep going
Related
Sources
- OASIS: OpenDocument v1.4, Part 3: Schema (meta:template, MIME types)
- Apache OpenOffice: MIME content types used by OpenOffice.org
- LibreOffice Help: Creating and changing default and custom templates
- Apache OpenOffice wiki: How do I know what template was used to create a file?
- Library of Congress: OpenDocument Format (ODF) Family
Last reviewed 27 October 2026.