What is a PBM File?

How to Open, Edit, & Convert PBM Files

PBM Files
PBM Files.

A file with the PBM file extension is mostly likely a Portable Bitmap Image file.

These files are text-based, black and white image files that contain either a 1 for a black pixel or a 0 for a white pixel.

PBM isn't nearly as common a format as PNG, JPG, GIF, and other image formats you've probably heard of.

How To Open a PBM File

PBM files can be opened with Inkscape, XnView, Adobe Photoshop, Netpbm, ACD Systems Canvas, Corel PaintShop Pro, and probably some other popular photo and graphics tools as well.

Given that PBM files are text based and contain mainly just ones and zeros, you can also use any basic text editor, like Notepad++ or Notepad in Windows, to open a PBM file. I have an example of a very basic PBM file at the bottom of this page.

Note: Some file formats use a file extension that looks similar to .PBM but that doesn't mean that they have anything in common. If your file doesn't open with the programs I mentioned above, it probably means you're not working with a PBM file. Check the file extension to make sure you aren't actually dealing with a PBP (PSP Firmware Update), PBN (Portable Bridge Notation), or PBD (EaseUS Todo Backup) file.

If you find that an application on your computer opens PBM files by default but you'd rather have a different installed program open them, see my How To Change the Default Program for a Specific File Extension tutorial for help on how to change it.

How To Convert a PBM File

The simplest way to convert a PBM file to PNG, JPG, BMP, or some other image format is to use a free file converter. Two of my favorites are the online converters FileZigZag and Convertio.

Another way to convert a PBM file is to open it in one of the PBM viewers/editors I mentioned a few paragraphs above, like Inkscape, and then save it to PDF, SVG, or some other similar format.

Example of a PBM File

When you open a PBM file in a text editor, it looks to be nothing but text - maybe a few codes and some notes, but certainly lots of 1s and 0s.

Here's a very simple example of a PBM image that would, when viewed as an image, look like the letter J:

# The letter "J"
6 10
0 0 0 0 1 0
0 0 0 0 1 0
0 0 0 0 1 0
0 0 0 0 1 0
0 0 0 0 1 0
0 0 0 0 1 0
1 0 0 0 1 0
0 1 1 1 0 0
0 0 0 0 0 0
0 0 0 0 0 0

If you look closely, assuming my page you're reading right now isn't breaking up the numbers you see above, you can actually see the 'J' represented as 1s.

Most image files don't work anywhere near this way, but PBM files do and are certainly an interesting way to create images.

More Information on the PBM File Format

PBM files are used by the Netpbm project and are similar to the Portable Pixmap Format (PPM) and the Portable Graymap Format (.PGM) format. Collectively, these file formats are sometimes called the Portable Anymap Format (.PNM).

Portable Arbitrary Map (.PAM) is an extension of these formats.

You can read more about the Netpbm format on Netbpm and Wikipedia.

More From Us