Flip PPM

Flip PPM images online for free. Mirror horizontally or vertically.

or drop photos here · up to 50 at once
…or paste an image (Ctrl+V)
Resize · Crop · Rotate · Flip
JPG, PNG, WebP, GIF, BMP, HEIC, TIFF and more.

How to Flip a PPM Image Online

  1. Choose Your PPM Files: Drag and drop PPM images onto the page or click "Choose PPM files" — up to 50 at once. The first photo opens in the editor and the rest line up as thumbnails below it; with two or more photos open, "Add more" adds files to the same batch.
  2. Flip It: In Flip, click "Horizontal" for a mirror image or "Vertical" to turn it upside down; click again to undo it. Flips stack with rotate, and the flip applies to every photo in the batch.
  3. Pick the Output Format (Optional): "Save as" keeps "Same as original" or saves as JPG, PNG, WebP or another format. For JPG, WebP and AVIF output, the "Quality" slider (40–100) trades file size against detail. Resize, Crop, Rotate and Flip all work in the same session, and "Undo" steps back.
  4. Download: Click the Download button, which names the output format (for example "Download PNG"), for one photo, or "Download all (.zip)" for a batch — "Download one by one" saves the files separately. PPM files are processed right in your browser, so they are not uploaded. No sign-up, no watermark.

Why Flip a PPM?

PPM (Portable Pixmap) is the colour member of the Netpbm family invented by Jef Poskanzer — the PBM monochrome format dates to the mid-1980s, and PGM (greyscale) and PPM (colour) were added by the end of 1988. A PPM file is one of the simplest raster containers on disk: a magic number (P3 for ASCII, P6 for binary), width and height in decimal, a maxval (1–65535), then a left-to-right top-to-bottom stream of RGB triplets. That simplicity is exactly why PPM is still the de-facto interchange format inside graphics research, ray tracers, computer-vision toolchains, and anything built on the Netpbm utilities.

  • Correct mirrored microscope or scanner output — Many compound microscopes invert the image through their optical path, and flatbed scanners with face-down originals or internal prisms often produce a left-right mirror. A horizontal flip restores the original orientation without re-encoding the raster.
  • Fix orientation from custom render pipelines — Hand-rolled ray tracers, OpenGL framebuffer dumps, and CUDA / compute-shader output frequently emit rows in the opposite order to PPM's top-down convention. A vertical flip aligns the image with downstream Netpbm tools and PNG / JPG converters.
  • Data augmentation for ML training — Computer-vision datasets exported as PPM (still common in academic robotics and OpenCV-era pipelines) routinely use horizontal mirrors to double the effective training set without recapture.
  • Mirrored variants for stereo or symmetry studies — Stereoscopic-rendering experiments and visual-perception studies need a left/right pair from a single source asset; PPM's lossless nature means the mirror is byte-for-byte identical to the original on the un-flipped axis.
  • Pre-processing for printed transfers — Iron-on transfers, sublimation paper, and screen-printing positives need a left-to-right mirror so the design reads correctly once flipped onto the substrate. PPM is fine for that step before exporting to a print driver.
  • Replace a pamflip -lr / pamflip -tb step in a script — When you need a one-off flip but don't have Netpbm installed (Windows, locked-down enterprise machines), an online flip is faster than installing Cygwin / WSL just for one file.

PPM vs Other Netpbm Formats — At a Glance

Property PPM (P6 / P3) PGM (P5 / P2) PBM (P4 / P1) PAM (P7)
Channels 3 (RGB) 1 (grey) 1 (1-bit B/W) Arbitrary (RGBA, multispectral)
Maxval range 1–65535 1–65535 n/a (binary) 1–65535 per sample
Bytes per pixel 3 (≤255 maxval) or 6 1 or 2 1 bit depends on tuple type
Compression None None None None
Magic numbers P6 binary, P3 ASCII P5 / P2 P4 / P1 P7
Typical use Colour intermediate Greyscale intermediate B/W masks, faxes Format with alpha
Convert to PNG PPM to PNG — — —

PPM Flip Settings — What the Editor Offers

Setting What it does When to change it
"Horizontal" / "Vertical" Mirrors the photo left-right or top-bottom; click again to undo Selfie text, a logo facing the wrong way, an upside-down scan
"Save as" "Same as original", or JPG, PNG, WebP, GIF, BMP, TIFF, ICO, AVIF, PSD, PPM The destination needs another format
"Quality" (40–100, starts at 85) Re-encode quality for JPG, WebP and AVIF output Lower for smaller files, higher before more editing
Resize (same session) Changes the pixel size along with the flip Downscale for the web in one pass

The editor has no DPI, bit-depth, compression-type or file-size-target setting. To hit a byte budget, run the result through Compress PPM.

Frequently Asked Questions

Does flipping a PPM lose any quality?

Not for an ordinary 8-bit PPM (maxval 255). A flip is a pure pixel-grid rearrangement — the Netpbm pamflip manual describes left-right and top-bottom flips as coordinate transforms with no resampling, and the same applies here. The saved PPM is always a binary P6 with maxval 255, so a maxval-255 source keeps every RGB value exactly, while a source with a different maxval is rescaled to 0–255 (a higher one loses precision).

What's the difference between P3 and P6 PPM, and does the flip handle both?

P3 is the ASCII variant — every R, G, and B sample is written as a decimal number separated by whitespace. P6 is the raw binary variant — samples are 1 byte (maxval ≤ 255) or 2 bytes big-endian (maxval ≥ 256). Both are accepted here, and the flipped file is always written as binary P6 — a P3 source comes back as P6. P6 is far more common because P3 files are typically 3–5× larger; if your toolchain needs ASCII P3, convert the result back with Netpbm (pnmtoplainpnm).

Why does my PPM open upside-down in some viewers?

The PPM spec orders rows top-to-bottom, but plenty of render and capture pipelines emit rows bottom-up (the OpenGL framebuffer convention) and write them straight into a PPM header without flipping. Viewers that follow the spec render those files inverted. A vertical flip rewrites the row order to match the spec and the file opens correctly everywhere.

Should I flip horizontally or vertically for an iron-on transfer?

Horizontally. Heat-transfer paper, sublimation transfers, and most screen-printing positives need a left-to-right mirror so the design reads correctly once the paper is flipped onto fabric. Vertical flip is for upside-down captures, not for transfer mirroring.

Will my maxval, bit depth, or P3/P6 variant change after the flip?

Yes, in some cases. The output is always binary P6 with maxval 255 and 1-byte samples: a P6 file with maxval 255 comes back in the same form, a P3 file comes back as P6, and a file with a higher maxval (2-byte samples) comes back as 8-bit. The editor has no PPM variant or bit-depth setting.

Can I flip and crop or rotate in the same step?

Yes. The same editor has Resize, Crop and Rotate tabs next to Flip, so you can flip, then crop or turn the picture before one download (Crop PPM and Rotate PPM open the same editor on those tabs). Flips and 90° turns move pixels without resampling; a fine-angle rotation or a resize does resample.

Is this the same as pamflip from Netpbm?

Functionally yes for the two flip axes. pamflip (which replaced pnmflip in Netpbm 10.13, December 2002) supports -leftright and -topbottom along with transpose and 90°/180°/270° rotations. This page's Flip tab handles the two flip axes; for rotations use the Rotate tab or Rotate PPM. If you need transpose (-xy) or diagonal reflection, pamflip on the command line is still the right tool.

Should I flip as PPM or convert first to PNG / JPG?

If the file is going back into a Netpbm or graphics-research pipeline, keep it as PPM — that's what the format exists for, and an 8-bit flip is pixel-exact. If the file is destined for the web, email, or a phone, run PPM to PNG for lossless compression (typically 2–4× smaller for photographic content, 10×+ for line art) or PPM to JPG for photographs (often 10–20× smaller). A 1080p 24-bit PPM is roughly 6.2 MB on disk; the same image as PNG is usually 1–3 MB and as JPG 200–500 KB.

Can I flip a 16-bit-per-channel PPM (maxval > 255) without quality loss?

No. PPM with a maxval ≥ 256 stores each sample in 2 bytes, big-endian, but this editor works in 8 bits per channel: the file opens and flips, and it is saved as an 8-bit P6 (maxval 255), so the 48-bit-per-pixel colour depth is not kept. For HDR renders, scientific imagery, and 16-bit scans where 8-bit reduction would be visible as banding, use pamflip instead and keep the original.

Rate Flip PPM Tool

★★★★✭
Rating: 4.8 / 5 - 45 reviews