What is the CGM file format?
.cgm files store raster or vector graphics and text. The format is supported by various graphics editing and technical illustration tools, and remains widely used in aerospace, defense, and engineering documentation - sectors where its long-established standardization carries more weight than everyday consumer tooling.
The main goal of creating the .cgm format was to develop a universal, platform-independent standard for storing graphics data. The CGM standard was defined by the International Organization for Standardization (ISO) and the International Electrotechnical Commission (IEC), published as ISO/IEC 8632, and simultaneously adopted as a US federal standard (FIPS PUB 128) in 1987. While .svg has largely taken over general-purpose web graphics, .cgm remains the mandated format in aviation (ATA Spec 2300, S1000D) and defense (CALS) documentation standards.
The CGM standard defines how vector and raster graphics are to be stored in .cgm files. Each graphic element has a list of attributes that define its appearance and rendering. CGM supports RGB direct color and indexed color models, with up to 24-bit direct color, along with additional color specifications used in industry-specific profiles - unlike the CMYK-oriented .eps format common in print workflows.
.cgm files can store various types of graphics data thanks to a rich array of elements that implement many standards. The CGM standard defines, for example:
- which types of data can be stored (lines, polylines, polygons, text glyphs, filled areas, and embedded raster cell arrays),
- how the contents will be displayed in a device-independent Virtual Device Coordinate (VDC) space,
- how images may be edited and extended through profile-specific element sets,
- support for external devices and interactive features via the WebCGM 2.1 profile.
CGM can store data depending on how the output image is to be generated and what properties it should have. CGM stores data using one of three standard encodings:
- Binary - fast file write and read; uses big-endian integer ordering,
- Character - portable character-based encoding designed for 7-bit ASCII transmission channels,
- Clear-Text - human-readable and easy to edit using standard text editors; a Clear-Text
.cgmfile begins with the ASCII keywordBEGMF.
Security & safety
RISK: LOWA CGM file is a passive vector graphic with no scripting, so the format itself is low risk. Practical cautions: many 'CGM viewers' surfaced by search are dead or bundled with adware - stick to the reputable tools listed; and because CGM is common in aerospace/defense, files may be technically sensitive, so avoid uploading confidential drawings to online converters.
Format details
in a nutshellPrograms that open CGM files
Technical details
deep spec| Standard | ISO/IEC 8632:1999 (CGM:1999), Parts 1-4; also ANSI X3.122 and US FIPS PUB 128 (1987) |
| MIME type | image/cgm (registered); alternatives include image/x-cgm and application/cgm |
| Encodings | Three defined by the standard: Binary (Part 3), Character (Part 2), and Clear-Text (Part 4) |
| File structure | Ordered sequence of metafile elements: Begin Metafile → Begin Picture → graphic primitives and attributes → End Picture → End Metafile |
| Graphic primitives | Polyline, disjoint polyline, polymarker, filled-area set, polygon, rectangle, circle, ellipse, circular arc, text, restricted text, cell array, tile array |
| Color support | Indexed color (color table entries) and direct RGB color; up to 24-bit direct color per the standard |
| Coordinate system | Device-independent Virtual Device Coordinates (VDC); precision set by VDC integer or real parameters - effectively unbounded coordinate range |
| Binary byte order | Big-endian; binary encoding uses big-endian integer and word ordering as specified in ISO/IEC 8632 Part 3 |
| Compression | None in the base standard; some profiles permit compressed embedded raster within cell array and tile array primitives |
| Raster embedding | Raster pixel data embedded inside the vector structure via cell array and tile array primitives |
| Text handling | Basic text with font index and character attributes; restricted text constrained to a bounding box; append text for continuation |
| Industry profiles | ATA Spec 2300 / iSpec 2200 (civil aviation), CALS / MIL-D-28003 (defense), S1000D (interactive technical manuals), WebCGM 2.1 (W3C/OASIS) |
| WebCGM extension | WebCGM 2.1 (W3C/OASIS, 2010) adds hyperlinks, named groups, metadata, and interactivity for web-deployed technical documentation |
| File identification | No single magic number across all encodings; Clear-Text .cgm begins with ASCII keyword BEGMF; Binary starts with a BEGMF command element (element class 0, id 1) |
| Primary use domains | Aerospace technical manuals, military/defense documentation, engineering illustrations; SVG has superseded .cgm for general web and consumer use |
| Released | 1987 (first standardized as ISO 8632 / ANSI; US FIPS PUB 128) |
| Latest version | CGM:1999 (ISO/IEC 8632:1999); WebCGM 2.1 published by W3C/OASIS in 2010 |
| Open standard | Yes · royalty-free |
| Specification | www.iso.org |
CGM conversions
Community Q&A
asked by usersNo questions yet - be the first to ask about CGM files.