What is the RELS file format?
.rels files are associated with Office Open XML software developed by Microsoft. .rels files store relationship metadata used when processing XML documents, mapping each part of a document package to its dependencies.
.rels files store XML-formatted relationship data. The root element is <Relationships>, which contains <Relationship> entries - each with an Id, a Type URI, and a Target path referencing an image, hyperlink, or another document part. .rels files are saved in _rels folders alongside the parts they describe: the package root uses _rels/.rels, while a Word body links its parts through word/_rels/document.xml.rels. Because OOXML packages such as .docx, .xlsx and .pptx are ZIP archives, a loose .rels file appears only after the package is extracted. .rels files can be edited with any standard text editor, then repacked into the ZIP using a tool such as 7-Zip.
Security & safety
RISK: LOWA .rels file is tiny, passive XML and is not dangerous in itself. Two practical cautions: its <Relationship> entries with TargetMode="External" can point at external URLs, which is the mechanism behind some malicious Office documents (e.g. remote-template/link attacks), so a .rels referencing an unexpected external address in a suspicious document is a red flag worth inspecting. Also, editing a .rels by hand and repacking incorrectly will corrupt the parent Office file - work on a copy. The file can't execute anything on its own.
Format details
in a nutshellPrograms that open RELS files
Technical details
deep spec| File encoding | UTF-8 (required by the OPC specification; no BOM) |
| MIME type | `application/vnd.openxmlformats-package.relationships+xml` |
| Container | Internal part of an OOXML/OPC ZIP package (`.docx`, `.xlsx`, `.pptx`, `.vsdx`, and others); not a standalone file |
| Storage location | Always inside a `_rels` subfolder alongside the part it describes; the package root relationship file is always `_rels/.rels` |
| Root XML element | `<Relationships>` in the fixed namespace `http://schemas.openxmlformats.org/package/2006/relationships` |
| Relationship attributes | Each `<Relationship>` requires three attributes: `Id` (unique within the file), `Type` (a URI identifying the relationship role), and `Target` (relative or absolute path) |
| TargetMode values | `Internal` (default - relative path inside the package) or `External` (absolute URI, used for hyperlinks and external data sources) |
| Naming convention | A part at `word/document.xml` stores its relationships at `word/_rels/document.xml.rels`; the pattern applies to every part in the package |
| Compression | DEFLATE-compressed as a ZIP entry inside the package; the XML content itself carries no additional compression layer |
| Typical file size | 100 bytes to a few kilobytes, depending on the number of relationships declared |
| Integrity checking | Relies on the ZIP container's per-entry CRC-32 checksum; no separate checksum is embedded in the XML |
| Binary signature | None - file is identified by its path convention (`_rels/*.rels`), not magic bytes; content begins with the UTF-8 XML declaration followed by `<Relationships>` |
| Released | 2006-2007 (Open Packaging Conventions, with Office 2007 / Office Open XML) |
| Latest version | ECMA-376 / ISO-IEC 29500 OPC; stable since the 1st edition (2008) |
| Open standard | Yes · royalty-free |
| Specification | learn.microsoft.com |
RELS conversions
Community Q&A
asked by usersNo questions yet - be the first to ask about RELS files.