What is the STW file format?
.stw is a word processor template format used by OpenOffice.org 1.x and StarOffice 6-8. It stores reusable document layouts, styles, and formatting - the template counterpart to .sxw writer documents - allowing users to create new documents with a predefined appearance.
Structurally, .stw files are ZIP archives using DEFLATE compression. Inside, the archive contains XML files following the OpenOffice.org 1.x schema: content.xml holds document content, styles.xml defines formatting, meta.xml stores metadata, and a mimetype entry identifies the format as application/vnd.sun.xml.writer.template. This schema pre-dates the standardised ODF specification and is not directly compatible with ODF 1.0 at the XML level, though modern applications convert transparently on open.
The format was introduced around 2000 with OpenOffice.org 1.0, which derived from the Sun/StarOffice 5.2 source code release. It was superseded in 2005 when ODF 1.0 introduced .ott as the standard writer template format.
LibreOffice Writer and Apache OpenOffice still open .stw files without issue but save in .ott or .odt by default. Renaming the file to .zip and extracting it reveals the internal XML files directly.
Files typically range from 10 KB to 500 KB, growing larger when templates embed images or complex graphical elements.
Security & safety
RISK: LOWSTW files are XML documents inside a ZIP archive - no executable code. LibreOffice macros embedded in a template would be the only potential risk, but LibreOffice prompts before running macros. Standard template files from trusted sources pose no security risk.
Format details
in a nutshellPrograms that open STW files
Technical details
deep spec| Container | ZIP archive (DEFLATE compression per entry) |
| Internal MIME identifier | application/vnd.sun.xml.writer.template (inside mimetype entry) |
| XML schema | OpenOffice.org 1.x (pre-ODF; incompatible with ODF 1.0 at the XML schema level) |
| Magic bytes | 50 4B 03 04 (standard ZIP header) |
| Key internal files | content.xml, styles.xml, meta.xml, settings.xml, mimetype |
| Character encoding | UTF-8 (XML throughout) |
| Typical file size | 10 KB - 500 KB |
| ZIP inspection | Renaming .stw to .zip and extracting reveals all internal XML files directly |
| Successor format | OTT (OpenDocument Text Template, ODF 1.0, 2005) |
| Companion format | SXW (OpenOffice.org 1.x writer document - same-era, non-template counterpart) |
| Checksum | ZIP CRC-32 per entry |
| Platform support | Windows, Linux, macOS |
| Backward compatibility | LibreOffice and Apache OpenOffice auto-convert on open; save as OTT/ODT by default |
| Template scope | Stores reusable styles, page layout, and default content for new Writer documents |
| Released | 2000 (OpenOffice.org 1.0 / StarOffice 6.0) |
| Latest version | OpenOffice.org 1.x / StarOffice 6-8 series; superseded by OTT in ODF 1.0 (2005) |
| Open standard | Yes · royalty-free |
| Specification | www.oasis-open.org |
STW conversions
Community Q&A
asked by usersNo questions yet - be the first to ask about STW files.