Computer Graphics Metafile
image/cgm
Released 1987
· by ISO / IEC
CGM (Computer Graphics Metafile) is a free and open ISO standard file format for 2D vector graphics, raster graphics, and text. It is heavily utilized in technical illustration, CAD, aerospace, and defense industries for its precision and standardized profiles (like WebCGM).
Technical Specifications
.cgm
Deflate (in some WebCGM profiles)
application/cgm
Magic Bytes & HTTP Headers
. / BEGIN METAFILE
Browser Support Matrix
| Browser | Status | Min Version |
|---|---|---|
|
|
Not Supported | — |
|
|
Not Supported | — |
|
|
Not Supported | — |
|
|
Not Supported | — |
|
|
Not Supported | Legacy |
Advantages & Limitations
- Strictly standardized by ISO, ensuring long-term archiving and cross-platform compatibility in engineering
- Excellent support for rich metadata, hyperlinks, and technical hotspots via the WebCGM profile
- Can store complex 2D geometry, rasters, and text in a single lightweight file
- Multiple encoding schemes (Binary, Character, Clear Text) make parser development difficult
- Zero native support in modern web browsers without third-party plugins
- Largely replaced by SVG for general-purpose 2D vector graphics on the web
Developer Code Snippets
File Detection Steps
How to programmatically detect a image/cgm
file by reading its raw bytes:
- 1 Check for 'BEGIN METAFILE' string in clear-text encoded files
- 2 Check for 0x0020 (Element Class 0, ID 1) in binary encoded files
Software Support
Conversion Tools
Share & Embed
[](https://freewebptojpg.com/mime/image/cgm)
<iframe src="https://freewebptojpg.com/mime/image/cgm/embed" width="100%" height="280" style="border:1px solid #cbd5e1;border-radius:8px;" title="CGM Specs"></iframe>
JSON API
All data on this page is available as a free, open JSON API. Use it in your project, documentation, or tooling.
GET https://freewebptojpg.com/mime/image/cgm.json
Open JSON
Frequently Asked Questions
What is a CGM file?
A Computer Graphics Metafile (CGM) is an international standard format for 2D vector and composite graphics. It is commonly used for technical documentation, engineering diagrams, and aerospace manuals (e.g., ATA iSpec 2200 and S1000D standards).
Are CGM files supported in modern web browsers?
No, standard web browsers do not natively support CGM. While the WebCGM profile was designed for web use, it traditionally required specialized viewer plugins. For modern web display, CGM files are usually converted to SVG.
Is CGM a vector or raster format?
CGM is a metafile format, meaning it can contain both infinitely scalable 2D vector graphics and embedded raster images, as well as text and metadata.