What is the ODG file format?
Files with the .odg extension are vector graphic files used to store drawings, supported by programs based on LibreOffice Draw and Apache OpenOffice Draw. .odg files are created in XML and stored using the OpenDocument OASIS format - the same container shared by .odt (text documents), .ods (spreadsheets) and .odp (presentations). The component files of an .odg file, like all ODF-series documents, are contained within a ZIP archive compressed package.
In vector graphics, an image is defined with geometric shapes placed in a coordinate system - this enables lossless scaling of a given work, making the format well suited to logo projects or various types of illustrations.
.odg file structure
The ZIP package of every ODF document (including .odg) comprises at least five components:
- a single-line
mimetypefile containing the textapplication/vnd.oasis.opendocument.graphics- stored uncompressed at the very start of the archive so tools can identify the format without fully extracting it content.xml- vector graphic elements and basic information about stylesstyles.xml- extended style information (default values, named styles)meta.xml- document metadata (e.g. creation date, ODF version, author)settings.xml- application settings such as window size
The contents of any of these files can be inspected with a standard ZIP unpacking tool.
Security & safety
RISK: LOWODG is a plain ZIP+XML document with no executable code path of its own, so risk is low. The only real concern is macro abuse: like other office documents an ODG can carry embedded Basic macros, and LibreOffice asks before running them. Keep macro security on its default level and only enable macros from sources you trust.
Format details
in a nutshellPrograms that open ODG files
Technical details
deep spec| Container format | ZIP archive (PkZip-compatible); first entry must be an uncompressed `mimetype` file |
| Format identification | `application/vnd.oasis.opendocument.graphics` string begins at byte offset 30, enabling format detection without full extraction |
| Magic bytes | `50 4B 03 04` ("PK") at offset 0 - standard ZIP local file header signature |
| MIME type | `application/vnd.oasis.opendocument.graphics` |
| Primary markup | XML (UTF-8 encoded), distributed across `content.xml`, `styles.xml`, `meta.xml` and `settings.xml` |
| Drawing model | SVG-compatible geometric primitives: paths, rectangles, ellipses, connectors, text frames and groups |
| Multi-page support | A single `.odg` file can contain multiple named drawing pages |
| Layer system | Named drawing layers with per-layer visibility and lock states, defined in `content.xml` |
| Embedded resources | Raster bitmaps and linked or embedded objects stored as sub-entries within the ZIP package |
| Master pages | Reusable master drawing pages (analogous to presentation slide masters) defined in `styles.xml` |
| Color and effects | RGB fills, gradient fills, transparency and drop-shadow effects supported natively |
| Digital signatures | Optional XML digital signatures stored in `META-INF/documentsignatures.xml` |
| Flat XML variant | `.fodg` stores identical content as a single uncompressed XML file with no ZIP wrapper |
| Macro scripting | Optional embedded macros (LibreOffice Basic or Python) stored in the ZIP's `Basic/` sub-directory |
| Released | 2005 (OpenDocument Format 1.0); ISO/IEC 26300 since 2006 |
| Open standard | Yes · royalty-free |
| Specification | docs.oasis-open.org |