About XPM Files
X PixMap
XPM (X PixMap) is a color image format for the X Window System that stores pixel data as ASCII text with a color palette. Unlike XBM, it supports full color and transparency through a simple text-based representation.
Family
Raster & Vector Images
Extension
.xpm
MIME Type
image/x-xpixmap
Can Use As
HOW XPM
CAME TO BE.
XPM — X PixMap — was designed in 1989 by Daniel Dardailler and Colas Nahaboo at Bull Research Centre for the X Window System, the classic Unix GUI display server. Unlike binary image formats, an XPM file is valid C source code: a 2D character array where each ASCII character corresponds to a color. Compile the XPM directly into a C program and you have an embedded icon. The format’s other charm: it’s human-editable in any text editor.
For most of the 1990s and 2000s, every X11 application stored its icons and cursors as .xpm. Window managers, file managers, toolkit widgets — all .xpm under the hood. As modern UI toolkits (GTK, Qt) moved to PNG and SVG for icons, XPM receded. It still appears in X11 system files and in some retro Linux distributions, preserving the aesthetic of "you can literally write an icon in vi."
CURIOSITIES &
TRIVIA.
An XPM file is valid C code — you can #include it directly into a program and use the resulting character array as an embedded icon.
XWindow's cursor, icon, and pixmap resources used XPM throughout the 1990s — every X11 app shipped with dozens of .xpm files.
XPM was one of the first image formats to support transparency via a dedicated "None" color value.
You can write an XPM icon in a plain text editor by typing character art — one of the few image formats with that property.
Modern GTK and Qt have largely replaced XPM with PNG and SVG, but system-level X11 still carries XPM traces.
STRENGTHS &
LIMITATIONS.
Strengths
- Valid C source — directly embeddable in code.
- Text-editable in any editor.
- Transparency via "None" color value.
- Stable since 1989 with no breaking changes.
Limitations
- Enormous file sizes vs compressed formats.
- Only useful within X11 / legacy Unix GUI ecosystem.
- Limited color palette in classic form (256 colors max practical).
- Superseded by PNG and SVG for modern UI.
Typical Sizes & Weights
Small icon (32×32, 16 colors)
2-5 KB
Toolbar button set
10-50 KB
Technical Specifications
- MIME type
- image/x-xpixmap
- Extension
- .xpm
- Encoding
- ASCII text (valid C source)
- Native environment
- X Window System (X11)
- Predecessor
- .xbm (X Bitmap, 1-bit)
CONVERT FROM
XPM
Common Use Cases
X Window system icons, Unix desktop themes, embedded color bitmaps
Related Formats
Popular comparisons
XPM vs JPG
Differences, file size, and when to choose each format.
XPM vs PNG
Differences, file size, and when to choose each format.
XPM vs WEBP
Differences, file size, and when to choose each format.
XPM vs AVIF
Differences, file size, and when to choose each format.
XPM vs GIF
Differences, file size, and when to choose each format.
XPM vs BMP
Differences, file size, and when to choose each format.
Popular XPM conversions
The most-requested destinations when starting from XPM.
Frequently Asked Questions about XPM
Frequently Asked Questions
XPM (X PixMap) is an image format used to store raster graphics — a two-dimensional grid of pixels describing a picture. It is part of the raster & vector images family and designed around a specific trade-off between file size, visual fidelity, and feature support (transparency, colour depth, compression type). Photographers, web designers, and content creators choose XPM when its particular strengths match the publishing target.
Most desktop photo viewers (Windows Photos, macOS Preview, GIMP, Photoshop, Affinity Photo) open XPM natively. On mobile, iOS Photos and Google Photos display XPM in the gallery when supported by the OS. If the format is rare or new, convert to JPG or PNG first — both are universally readable — using our XPM to JPG or XPM to PNG converter.
Upload the XPM to KaijuConverter and pick a target format (JPG, PNG, WebP, HEIC, TIFF, BMP, SVG, PDF). The conversion runs in the browser via ImageMagick and returns a download in seconds. No account or installation required; both input and output delete automatically within two hours.
It depends on the task. JPG is the smallest file size for photographs; PNG is lossless with transparency; XPM has its own niche that may favour colour depth, animation, or encoding efficiency over one or both of those. For the final web publish, test all three and measure file size plus visible quality on real content.