XWD to PGM Converter

Switch from XWD to PGM — simple online image conversion

Drop files here. 1 GB maximum file size or Sign Up
to
Facebook Amazon Microsoft Tesla Nestle Walmart L'Oreal

Modern Format Output

PGM provides grayscale image format from the Netpbm toolkit — a significant upgrade over the legacy XWD format for everyday image use and sharing.

No Install Required

The entire XWD to PGM conversion happens in your browser. No plugins, no desktop apps — just upload, convert, and download.

Any Device Works

Convert XWD to PGM from Windows, macOS, Linux, or mobile — the browser-based tool adapts to any screen size and operating system.

How to convert XWD to PGM

1

Select files from Computer, Google Drive, Dropbox, URL or by dragging it on the page.

2

Choose pgm or any other format you need as a result (more than 200 formats supported)

3

Let the file convert and you can download your pgm file right afterwards

About formats

XWD (X Window Dump) is a screen capture image format defined as part of the X Window System by the MIT X Consortium, dating to approximately 1987. The xwd command-line utility captures the contents of an X window or the entire screen and saves it as an XWD file — functionally equivalent to a screenshot utility but predating the concept by years. XWD files contain a detailed header specifying the X server's visual type, bit depth, byte order, bitmap unit and padding, the window's dimensions, border width, and color map information, followed by the raw pixel data exactly as represented in the X server's framebuffer. This means XWD files faithfully capture the exact pixel representation used by the display hardware — including server-specific byte ordering, padding, and color organization — making them primarily useful on the system where they were captured or on systems with compatible display configurations. The header also stores the window name string and the full color map entries for indexed-color visuals. XWD supports all X11 visual types: StaticGray, GrayScale, StaticColor, PseudoColor, TrueColor, and DirectColor, at any bit depth supported by the X server. One advantage is exact framebuffer fidelity: XWD captures the window's pixel data in its native format without any color space conversion or compression, making it the definitive record of what the X server was actually displaying. The format's integration with the X11 command-line toolkit provides another practical benefit — xwd can capture specific windows by ID or name, be triggered remotely via SSH, and piped directly to format converters. XWD files are handled by ImageMagick, GIMP, xwud (the viewer companion to xwd), and xv.
Developer: MIT X Consortium
Initial release: 1987
PGM (Portable Graymap) is the grayscale member of the Netpbm image format family, created by Jef Poskanzer in 1988 as part of the Pbmplus toolkit for Unix systems. PGM stores single-channel intensity images where each pixel holds a gray value from 0 (black) to a user-specified maximum (typically 255 for 8-bit or 65535 for 16-bit). The format exists in ASCII (magic number P2), where pixel values are written as decimal text numbers separated by whitespace, and binary (magic number P5), where values are stored as raw bytes. Both variants begin with a header specifying the magic number, width, height, and maximum gray value. PGM was designed as the grayscale intermediate in Netpbm's convert-process-convert pipeline philosophy: source images from any format are converted to PGM, processed using Netpbm's extensive command-line tool library, then converted to the target format. One advantage is format transparency — the ASCII variant makes image data directly readable by humans and trivially processable by text tools like awk and grep, invaluable for debugging and education. The scientific and computer vision community's adoption is another strength: PGM's straightforward single-channel representation makes it a natural format for image analysis algorithms, and many academic papers and course materials use PGM examples. The format is supported by ImageMagick, GIMP, and countless image processing libraries, and remains standard input for many research tools and benchmarks.
Developer: Jef Poskanzer
Initial release: 1988

Frequently Asked Questions

What is the reason to convert XWD to PGM?

XWD originated in Unix/X11 screenshots and has narrow compatibility today. PGM offers grayscale image format from the Netpbm toolkit — a far more practical choice for sharing.

What apps support PGM?

You can view PGM with GIMP, ImageMagick, IrfanView, XnView. These tools cover all major desktop and mobile platforms.

Are my uploaded files kept private?

Your privacy is protected. All uploaded files are erased after conversion and output files are purged within 24 hours — nothing is stored long-term.

Can I convert multiple XWD files to PGM at once?

Convertio supports batch mode — drag in multiple XWD files and they all convert to PGM together, which is much faster than one-by-one.

What exactly is the XWD format?

XWD is a screen capture format from X Window System. Originally from Unix/X11 screenshots, it has become a legacy format — conversion is the most practical way to use these images today.

Does this converter work on mobile devices?

It works on any device with a web browser. Whether you are on Android, iOS, Windows, or macOS — XWD to PGM conversion is fully supported.