File types · Explainer

The SXW file (.sxw)

An SXW file is a word-processing document from OpenOffice.org 1.x or StarOffice 6 and 7, the XML format that OpenDocument's ODT grew out of. This guide explains what's inside one, how it differs from an ODT, how to open and convert old SXW files today, and has free sample SXW files to download for testing.

At a glance

Full name
OpenOffice.org 1.0 Text Document (StarOffice 6.0 / Writer 6.0 XML format)
Extensions
.sxw; .stw for templates, .sxg for master (global) documents
MIME type
application/vnd.sun.xml.writer (templates: application/vnd.sun.xml.writer.template)
Kind
Binary: a ZIP package of XML files and pictures
Owner
Sun Microsystems and the OpenOffice.org project; the format was handed to OASIS and became OpenDocument
First released
2002, with OpenOffice.org 1.0 and StarOffice 6.0
Replaced by
ODT, the default from OpenOffice.org 2.0 and StarOffice 8 in 2005
Opens with
LibreOffice Writer and Apache OpenOffice Writer; LibreOffice opens it but no longer saves it
Magic number
50 4B 03 04 (ZIP), then mimetype at byte 30 and application/vnd.sun.xml.writer at byte 38
XML namespaces
http://openoffice.org/2000/office, …/2000/text and so on, not the OASIS urn: names of ODF

The basics

What is an SXW file?

An SXW file is a text document saved by OpenOffice.org 1.0 or 1.1, or by Sun's StarOffice 6 and 7, between 2002 and 2005. It was the first XML-based format for those suites, replacing the binary .sdw files of StarWriter 5.x. If you have an SXW today, it is almost always an old document from an archive, a backup or a university server.

Sun gave the format to OASIS, where it became the starting point of the OpenDocument Format. OpenOffice.org 2.0 and StarOffice 8 switched to ODF in 2005, and SXW's successor is the ODT. The two are close relatives: both are ZIP packages with content.xml, styles.xml, meta.xml and a manifest, but the XML names changed, so they are not interchangeable.

Application1.x document1.x templateODF successor
Writer (text).sxw.stw`.odt`
Calc (spreadsheet).sxc.stc`.ods`
Impress (presentation)`.sxi`.sti`.odp`
Draw (drawing).sxd.std.odg
Writer master document.sxg.odm
Math (formula).sxm.odf

Anatomy

What's inside an SXW file

Rename an .sxw to .zip and it opens like any archive, just like an ODT. Our sample-minimal.sxw was written by hand with the three entries LibreOffice needs to open it. Set it beside the minimal ODT and the family resemblance is clear; the names are what changed.

sample-minimal.sxw (file list and XML)
$ unzip -l sample-minimal.sxw
  Length      Date    Time    Name
---------  ---------- -----   ----
       30  2026-10-27 12:00   mimetype
      478  2026-10-27 12:00   content.xml
      414  2026-10-27 12:00   META-INF/manifest.xml

Bytes 0-67: 50 4B 03 04 … "mimetype" "application/vnd.sun.xml.writer"

content.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE office:document-content PUBLIC
    "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "office.dtd">
<office:document-content xmlns:office="http://openoffice.org/2000/office"
    xmlns:text="http://openoffice.org/2000/text"
    office:class="text" office:version="1.0">
 <office:body>
  <text:h text:level="1">Hello, SXW</text:h>
  <text:p>Sample SXW from 99helpers.com/file-types/sxw</text:p>
 </office:body>
</office:document-content>

META-INF/manifest.xml:
<!DOCTYPE manifest:manifest PUBLIC
    "-//OpenOffice.org//DTD Manifest 1.0//EN" "Manifest.dtd">
<manifest:manifest xmlns:manifest="http://openoffice.org/2001/manifest">
 <manifest:file-entry manifest:media-type="application/vnd.sun.xml.writer"
     manifest:full-path="/"/>
 <manifest:file-entry manifest:media-type="text/xml"
     manifest:full-path="content.xml"/>
</manifest:manifest>
  1. 150 4B 03 04

    The ZIP signature

    An SXW is a ZIP file. The OpenOffice.org project chose ZIP so any archive tool could get at the XML inside.

  2. 2application/vnd.sun.xml.writer

    The mimetype entry

    First in the package and stored uncompressed, so this 30-character string starts at byte 38, the same trick ODF kept. Format registries such as PRONOM identify SXW files from it.

  3. 3<!DOCTYPE … office.dtd>

    A DTD, not a schema

    OpenOffice.org 1.x was defined by a DTD and files often carried a DOCTYPE line. ODF switched to a RELAX NG schema and dropped it.

  4. 4xmlns:office="http://openoffice.org/2000/office"

    The old namespaces

    Every 1.x namespace is an http://openoffice.org/… address. In an ODT the same element lives in urn:oasis:names:tc:opendocument:xmlns:office:1.0, so XML code written for one doesn't match the other.

  5. 5office:class="text"

    The document class

    The root says what kind of document this is: text here, spreadsheet in an SXC, presentation in an SXI. ODF dropped the attribute.

  6. 6office:version="1.0"

    The format version

    OpenOffice.org 1.x wrote 1.0 here. PRONOM's signature for SXW looks for this value in meta.xml.

  7. 7<office:body><text:h>

    Content directly in the body

    Headings and paragraphs sit straight inside office:body. An ODT wraps them in office:text first.

  8. 8xmlns:manifest="http://openoffice.org/2001/manifest"

    The manifest

    Lists every file in the package with its type; the root entry repeats application/vnd.sun.xml.writer. ODF kept the idea and changed the namespace.

Under the hood

What changed between SXW and ODT

We saved one Writer document as sample-document.sxw and as sample-document.odt. The packages hold the same parts; the XML inside differs in ways that matter to anyone parsing it:

SXW (OpenOffice.org 1.x)ODT (OpenDocument)
mimetypeapplication/vnd.sun.xml.writerapplication/vnd.oasis.opendocument.text
Namespaceshttp://openoffice.org/2000/office, …/text, …/styleurn:oasis:names:tc:opendocument:xmlns:office:1.0 and so on
Root elementoffice:class="text", office:version="1.0"No class; office:version 1.0 to 1.4
BodyContent directly in office:bodyoffice:body then office:text
Formatting propertiesOne style:properties element for everythingSplit into style:paragraph-properties, style:text-properties, style:table-properties…
Page setupstyle:page-masterstyle:page-layout
Liststext:ordered-list and text:unordered-listtext:list; the list style decides bullets or numbers
ValidationDTDRELAX NG schema

Because the structure is so close, LibreOffice opens an SXW by translating its XML into ODF on the fly, which is why old documents usually come through with their styles, tables and pictures intact.

How to

How to open and convert an SXW file

  • LibreOffice Writer (free; Windows, macOS, Linux) opens SXW files. It no longer offers SXW in Save As: LibreOffice 24.2's filter list marks the format import-only, so saving gives you an ODT or another current format.
  • Apache OpenOffice opens SXW files too. Some other word processors, such as AbiWord, can import them.
  • Microsoft Word opens ODT, not SXW. Convert the file in LibreOffice first.
  • Convert one file: open it in LibreOffice and use File, Save As, or run soffice --headless --convert-to odt report.sxw (or docx, or pdf).
  • Convert a folder of old files: soffice --headless --convert-to odt --outdir converted *.sxw converts them all in one run.
  • On a phone or in a browser: browsers can't display SXW files, so a link to one downloads it. Convert to PDF to share something people can read anywhere.

Keep the original

Converting an archive of SXW files to ODT or PDF is sensible for access, but keep the originals: a converter can drop details such as change tracking or fields, and the SXW is the authentic record.

Troubleshooting

Common SXW problems and how to fix them

  • Windows doesn't know what to do with it. No app is registered for .sxw. Install LibreOffice, or right-click, Open with, LibreOffice Writer.
  • I need to save as SXW for an old system. Current LibreOffice can't. Use an old OpenOffice.org or LibreOffice version on a machine set aside for it, or ask whether the system accepts ODT, which is its successor.
  • My XML code finds nothing in an SXW. It's looking for the ODF namespaces. SXW uses http://openoffice.org/2000/… namespaces and a different body structure; see the table above.
  • The layout shifted after conversion. Fonts from 2003 may be missing on your system and get replaced. Install the fonts the document uses, or accept the substitutes.
  • It asks for a password. The document was encrypted when saved. Without the password it can't be opened; LibreOffice will ask for it as OpenOffice.org did.
  • It downloads as a ZIP. The server sends application/zip. Serve .sxw as application/vnd.sun.xml.writer.

Security

Is an SXW file safe to open?

An SXW is XML in a ZIP, so the document itself is not a program. But like ODT it can carry StarBasic macros under the same extension, and LibreOffice treats them as it treats macros in ODF files: with the default macro security, only macros signed by a trusted source or stored in a trusted location run. Don't lower that setting for an old document.

  • Old encryption. A password-protected SXW uses the encryption OpenOffice.org 1.x had. For anything sensitive, open it and save it again as ODT with a new password, which LibreOffice protects with AES.
  • Metadata. meta.xml holds the author, dates, editing time and sometimes the template path, which can reveal names and folder structures from years ago.
  • Linked files. Old documents often link pictures or sections from paths that no longer exist. That's harmless, but the paths themselves can reveal internal server names.

Free downloads

Sample SXW files to download

Free sample OpenOffice.org 1.x Writer documents for testing archive migration, file-type detection and converters. Current LibreOffice can still write SXW, but its filter is switched off for saving; our generator switches it back on in a throwaway profile, so sample-document.sxw comes from LibreOffice 24.2's own 1.x exporter. We then set office:version to 1.0, as OpenOffice.org 1.x wrote it (the exporter leaves its ODF version, 1.3). All files were checked with unzip -t and by opening them in LibreOffice and exporting a PDF.

sample-document.sxw · 19.7 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-document.sxw

Browsers can't preview SXW files, so download it and open it in LibreOffice Writer, or rename a copy to .zip to read the XML. These are the parts to look for.

  1. The 1.x mimetype

    application/vnd.sun.xml.writer at byte 38, the same place an ODT keeps its type.

  2. Title and headings

    A Title paragraph and three Heading 1 headings, written as text:p and text:h elements straight inside office:body.

  3. A bulleted list

    Five items in a text:ordered-list with the bullet list style "List 1": in 1.x the list style, not the element name, decides what you see.

  4. A table

    Four rows and three columns of fictional library opening hours, with Table Heading and Table Contents paragraph styles.

  5. A footer with a page number

    The page style has a footer reading "Sample SXW from 99helpers.com/file-types/sxw · page 1", the number a text:page-number field.

  6. Special characters

    café, naïve, Zürich, €, ½ and curly quotes, stored as UTF-8 XML.

  7. Metadata

    Title "Sample SXW document", keywords and the description "… Free sample from 99helpers.com/file-types/sxw" in meta.xml, in the http://openoffice.org/2000/meta namespace.

All sample SXW files

  • One-page SXW document

    sample-document.sxw · 19.7 KB (20,173 bytes)

    An A4 page with a title, headings, a bulleted list, a table, a footer with a page number field, accented characters and document properties, written by LibreOffice's 1.x exporter.

    • Testing archive migration and SXW to ODT, DOCX or PDF conversion
    • Checking that file-type detection recognises SXW
  • The same document as an ODT

    sample-document.odt · 20.6 KB (21,065 bytes)

    Saved from the same Writer document as the SXW. Compare the two content.xml files to see every name that changed between OpenOffice.org 1.x and OpenDocument.

    • Comparing the 1.x format with its successor
    • Checking a converter gives the same result from both
  • Minimal SXW, three entries

    sample-minimal.sxw · 851 bytes

    Only mimetype, content.xml and META-INF/manifest.xml, written by hand: one heading and one paragraph. It's the file shown in the anatomy above.

    • Parser tests: don't assume `styles.xml` or `meta.xml` exist
    • A tiny file for upload and detection tests

Ways to test with them

  • File type detection: all three files start with PK and have mimetype at byte 30. From byte 38 the SXW files say application/vnd.sun.xml.writer, the ODT application/vnd.oasis.opendocument.text. The Unix file command reports "OpenOffice.org 1.x Writer document" for both SXW files.
  • Conversion: run soffice --headless --convert-to pdf sample-document.sxw and check the table, the bullets and the page number in the footer.
  • Same result from both: convert sample-document.sxw and sample-document.odt to DOCX or PDF and compare. Differences point to gaps in a converter's SXW support.
  • Namespace handling: point XML code written for ODT at sample-minimal.sxw. If it finds no paragraphs, it needs to handle the 1.x namespaces or convert first.

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 SXW file? Give it a link.

Drop an old OpenOffice.org document on 99helpers and it gets its own link. Browsers can't display SXW files, so visitors download it and open it in LibreOffice or Apache OpenOffice; to share something everyone can read, convert it to PDF first.

Questions

SXW files, frequently asked

What is an SXW file?

A text document from OpenOffice.org 1.x or StarOffice 6 and 7, saved between 2002 and 2005. It's a ZIP package of XML files and the direct predecessor of the ODT format.

How do I open an SXW file?

With LibreOffice Writer or Apache OpenOffice Writer, both free. LibreOffice opens it as it would an ODT.

Can Microsoft Word open SXW files?

No. Word opens ODT but not SXW. Open the file in LibreOffice and save it as DOCX or ODT, or run soffice --headless --convert-to docx file.sxw.

What's the difference between SXW and ODT?

Both are ZIP packages of XML with the same parts, but ODT uses the OASIS OpenDocument namespaces and a revised vocabulary. SXW is the OpenOffice.org 1.x format that ODF was based on.

Can LibreOffice save as SXW?

Not from the menus. Current LibreOffice opens SXW files but marks the format import-only, so you save the result as ODT, DOCX or PDF.

How do I convert SXW to PDF or DOCX?

Open it in LibreOffice and use File, Export as PDF or Save As. For many files: soffice --headless --convert-to pdf *.sxw.

What is an STW file?

The OpenOffice.org 1.x Writer template, the predecessor of the [OTT](/file-types/ott). Its MIME type is application/vnd.sun.xml.writer.template.

Is it safe to open an old SXW file?

Generally yes. It can contain macros, which LibreOffice blocks by default unless they're signed by a trusted source. Keep that setting.

Related formats

Other file types explained

Keep going

Related

Sources

Last reviewed 27 October 2026.