# Convert PGM to XPM

> Convert PGM to XPM online for free. Runs entirely in your browser, so your files never leave your device. Fast batch conversion, no sign-up, no watermarks.

URL: https://www.converterrr.com/pgm-to-xpm

- Runs in the browser with ImageMagick: files are not uploaded, and no credits are used.
- Engines: ImageMagick (browser), ImageMagick (cloud).
- API: available. `POST /api/v1/jobs` with `"output_format": "xpm"` (paid plans).
- More: [Image converter](https://www.converterrr.com/image-converter), [PGM converter](https://www.converterrr.com/pgm-converter).

## How to convert PGM to XPM

1. **Add your PGM files.** Drag and drop PGM files onto the converter, paste them, or click to browse. You can add several at once.
2. **Choose XPM.** XPM is already selected. Open Options if you want to change quality, size or metadata.
3. **Convert.** Click Convert. Your files are converted right in your browser in seconds.
4. **Download your XPM.** Download each XPM file, or everything at once as a ZIP.

## Good to know

- PGM files are typically used for grayscale image processing, while XPM is best for X11 and Linux desktop icons.
- This conversion runs on ImageMagick, running locally in your browser — nothing is uploaded and it works even on slow connections.

## PGM vs XPM

|  | PGM | XPM |
| --- | --- | --- |
| Full name | Portable Graymap | X PixMap |
| Type | Image | Image |
| Extensions | .pgm | .xpm |
| MIME type | image/x-portable-graymap | image/x-xpixmap |
| Best for | grayscale image processing | X11 and Linux desktop icons |
| Properties | lossless | legacy format |

**PGM:** PGM is the grayscale member of the Netpbm family: uncompressed, simple and easy to parse.

**XPM:** XPM is a text-based color image format from the X Window System, stored as C source code.

The other way around: [convert XPM to PGM](https://www.converterrr.com/xpm-to-pgm).

## Related conversions

- [XPM to PGM](https://www.converterrr.com/xpm-to-pgm) (in the browser)
- [PGM to PNG](https://www.converterrr.com/pgm-to-png) (in the browser)
- [PNG to XPM](https://www.converterrr.com/png-to-xpm) (in the browser)
- [PGM to JPG](https://www.converterrr.com/pgm-to-jpg) (in the browser)
- [JPG to XPM](https://www.converterrr.com/jpg-to-xpm) (in the browser)
- [PGM to WebP](https://www.converterrr.com/pgm-to-webp) (in the browser)
- [WebP to XPM](https://www.converterrr.com/webp-to-xpm) (in the browser)
- [PGM to JPEG](https://www.converterrr.com/pgm-to-jpeg) (in the browser)
- [HEIC to XPM](https://www.converterrr.com/heic-to-xpm) (in the browser)
- [PGM to PDF](https://www.converterrr.com/pgm-to-pdf) (cloud)
- [JPEG to XPM](https://www.converterrr.com/jpeg-to-xpm) (in the browser)
- [PGM to GIF](https://www.converterrr.com/pgm-to-gif) (in the browser)

## Convert PGM to other formats

[PGM to PNG](https://www.converterrr.com/pgm-to-png), [PGM to JPG](https://www.converterrr.com/pgm-to-jpg), [PGM to WebP](https://www.converterrr.com/pgm-to-webp), [PGM to JPEG](https://www.converterrr.com/pgm-to-jpeg), [PGM to PDF](https://www.converterrr.com/pgm-to-pdf), [PGM to GIF](https://www.converterrr.com/pgm-to-gif), [PGM to AVIF](https://www.converterrr.com/pgm-to-avif), [PGM to SVG](https://www.converterrr.com/pgm-to-svg), [PGM to ICO](https://www.converterrr.com/pgm-to-ico), [PGM to TIFF](https://www.converterrr.com/pgm-to-tiff), [PGM to BMP](https://www.converterrr.com/pgm-to-bmp), [PGM to PSD](https://www.converterrr.com/pgm-to-psd), [PGM to EPS](https://www.converterrr.com/pgm-to-eps), [PGM to JXL](https://www.converterrr.com/pgm-to-jxl), [PGM to TGA](https://www.converterrr.com/pgm-to-tga), [PGM to DDS](https://www.converterrr.com/pgm-to-dds), [PGM to EXR](https://www.converterrr.com/pgm-to-exr), [PGM to HDR](https://www.converterrr.com/pgm-to-hdr), [PGM to JP2](https://www.converterrr.com/pgm-to-jp2), [PGM to CUR](https://www.converterrr.com/pgm-to-cur), [PGM to PPM](https://www.converterrr.com/pgm-to-ppm), [PGM to QOI](https://www.converterrr.com/pgm-to-qoi), [PGM to PCX](https://www.converterrr.com/pgm-to-pcx), [PGM to PBM](https://www.converterrr.com/pgm-to-pbm)

## Convert other formats to XPM

[PNG to XPM](https://www.converterrr.com/png-to-xpm), [JPG to XPM](https://www.converterrr.com/jpg-to-xpm), [WebP to XPM](https://www.converterrr.com/webp-to-xpm), [HEIC to XPM](https://www.converterrr.com/heic-to-xpm), [JPEG to XPM](https://www.converterrr.com/jpeg-to-xpm), [GIF to XPM](https://www.converterrr.com/gif-to-xpm), [AVIF to XPM](https://www.converterrr.com/avif-to-xpm), [SVG to XPM](https://www.converterrr.com/svg-to-xpm), [ICO to XPM](https://www.converterrr.com/ico-to-xpm), [TIFF to XPM](https://www.converterrr.com/tiff-to-xpm), [BMP to XPM](https://www.converterrr.com/bmp-to-xpm), [HEIF to XPM](https://www.converterrr.com/heif-to-xpm), [PSD to XPM](https://www.converterrr.com/psd-to-xpm), [EPS to XPM](https://www.converterrr.com/eps-to-xpm), [AI to XPM](https://www.converterrr.com/ai-to-xpm), [JXL to XPM](https://www.converterrr.com/jxl-to-xpm), [CR2 to XPM](https://www.converterrr.com/cr2-to-xpm), [NEF to XPM](https://www.converterrr.com/nef-to-xpm), [DNG to XPM](https://www.converterrr.com/dng-to-xpm), [CR3 to XPM](https://www.converterrr.com/cr3-to-xpm), [ARW to XPM](https://www.converterrr.com/arw-to-xpm), [TGA to XPM](https://www.converterrr.com/tga-to-xpm), [DDS to XPM](https://www.converterrr.com/dds-to-xpm), [EXR to XPM](https://www.converterrr.com/exr-to-xpm)

## PGM to XPM: frequently asked questions

### How do I convert PGM to XPM?

Drop your PGM file onto the converter above, make sure XPM is selected, and click Convert. When it's done, download the XPM file — it usually takes a few seconds.

### Is it safe to convert PGM to XPM here?

Yes. PGM to XPM conversion happens entirely inside your browser using WebAssembly, so your file is never uploaded to any server.

### Is the PGM to XPM converter free?

Yes — free with no watermark. Signed-out visitors can convert 25 files a day, and a free account raises that to 250.

### Will converting PGM to XPM reduce quality?

No — XPM preserves the content of your PGM file as faithfully as the format allows.

### Can I convert multiple PGM files at once?

Yes. Add up to 5 files at a time without an account, 10 with a free account and up to 500 on paid plans, then download them individually or as a single ZIP.

### Can I convert XPM back to PGM?

Yes — use our XPM to PGM converter. Note that converting back and forth between formats can't recover detail lost to lossy compression.
