File types · Explainer

The OTT file (.ott)

An OTT file is an OpenDocument text template, the template format of LibreOffice Writer: opening it creates a new, untitled document based on it. This guide explains what's inside one, how it differs from an ODT, how to make, use and convert templates, and has free sample OTT files to download for testing.

At a glance

Full name
OpenDocument Text Template, part of the Open Document Format (ODF)
Extensions
.ott
MIME type
application/vnd.oasis.opendocument.text-template
Kind
Binary: a ZIP package of XML files, built exactly like an ODT
Standard
OASIS OpenDocument; ISO/IEC 26300
First released
2005, with ODF 1.0 and OpenOffice.org 2.0
Opens with
LibreOffice Writer, Apache OpenOffice Writer and other ODF word processors
Magic number
50 4B 03 04 (ZIP), then mimetype at byte 30 and application/vnd.oasis.opendocument.text-template at byte 38
What marks it
The mimetype entry and the manifest's root entry say …text-template
Macros
Allowed under the same extension (LibreOffice Basic and other scripts)

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:

DocumentTemplateTemplate MIME type
`.odt` text.ottapplication/vnd.oasis.opendocument.text-template
`.ods` spreadsheet.otsapplication/vnd.oasis.opendocument.spreadsheet-template
`.odp` presentation.otpapplication/vnd.oasis.opendocument.presentation-template
.odg drawing.otgapplication/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.

sample-minimal.ott (file list and XML)
$ 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">&lt;Your heading&gt;</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. 150 4B 03 04

    The ZIP signature

    Every OTT is a ZIP file, like every ODT, so the first four bytes don't reveal it's a template.

  2. 2mimetype

    The 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. 3application/vnd.oasis.opendocument.text-template

    The template's type

    48 characters, no line break. In an ODT this reads application/vnd.oasis.opendocument.text. Detectors such as file read it, which is why file reports "OpenDocument Text Template" for an OTT.

  4. 4content.xml

    The 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. 5<office:text>

    A text document

    office:text marks word-processing content, as in an ODT. A spreadsheet template (.ots) has office:spreadsheet here.

  6. 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. 7manifest:full-path="/"

    The manifest's root entry

    Repeats the package's type. In a valid file it matches the mimetype entry: …text-template here.

  8. 8(no styles.xml, meta.xml)

    What a real template adds

    Named styles and page layouts in styles.xml, metadata in meta.xml, settings and a thumbnail. Our sample-letter.ott has 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:

EntryIn the OTTIn the ODT
mimetype…opendocument.text-template…opendocument.text
META-INF/manifest.xml, root entry…opendocument.text-template…opendocument.text
settings.xmlA different random Rsid value, which LibreOffice uses to track edit sessions
content.xml, styles.xml, meta.xml, thumbnailIdenticalIdentical

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 .ott in your file manager does the same.
  • Edit a template: in the Template Manager, right-click it and choose Edit. Opening the .ott the 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.dotm plays 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 .ott from 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:placeholder elements in the XML, shown shaded on screen. LibreOffice doesn't print them: when we exported sample-letter.ott to 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.xml carry 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

OTTDOTXDOTMDOTODT
What it isODF text templateWord templateWord template with macrosWord 97-2003 templateODF text document
Native appLibreOffice WriterMicrosoft WordMicrosoft WordWord 97-2003LibreOffice Writer
StructureZIP of XMLZIP of XMLZIP of XMLOLE2 binaryZIP of XML
What marks a templatemimetype entryMain part content typeMain part content typefDot bit(not a template)
MacrosYes, same extensionNoYesYes, same extensionYes, 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 mimetype entry must be first and uncompressed. With Info-ZIP: zip -X0 new.ott mimetype then zip -Xr new.ott . -x mimetype.
  • It downloads as a ZIP or opens as the wrong type. The server sends application/zip. Serve .ott as application/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 like C:\Users\name\Templates\Offer.ott can 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.

sample-letter.ott · 15.8 KBDownload

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.

  1. 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.

  2. Placeholder fields

    Eleven text:placeholder fields such as <Recipient name> and <Your name>: click one and type to replace it. They don't print until you fill them in.

  3. A date field

    A text:date field with a long date format ("27 October 2026"). It isn't fixed, so each new letter shows the current date.

  4. 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.

  5. Metadata

    Title "Letter template", subject, keywords and the description "Free sample from 99helpers.com/file-types/ott" in meta.xml.

  6. The template type

    application/vnd.oasis.opendocument.text-template in the mimetype entry and the manifest. Apart from a random session ID, that's all that separates it from sample-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 mimetype entry, the manifest's root entry and a session ID in settings.xml differ.

    • 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.xml and META-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 PK and have mimetype at byte 30. Read 48 bytes from byte 38: the three OTT files say …text-template, the ODT says …text followed by other data.
  • New document, not the file: opening sample-letter.ott should give an untitled document. An app that opens and saves over the template has a bug.
  • Placeholders: export sample-letter.ott to 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.ott to DOTX and check the heading styles, the table of contents and the page fields in Word.
  • Defensive parsing: sample-minimal.ott has no styles.xml or meta.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

Last reviewed 27 October 2026.