← Blog

PNG vs JPEG — picking the right format before converting to PDF

Same content, two formats — file size differs by 5–10× depending on which one fits Use PNG when… • content has sharp edges (text, UI, line art) • you need exact pixel preservation • transparency is required • colors are limited (≤256, screenshots) • content will be re-edited later examples screenshots, logos, diagrams, UI mockups, line art, icons Use JPEG when… • content is photographic (continuous tones) • small size matters more than pixel precision • final output, not source for editing • content has many colors (millions) examples photos, scanned documents, paintings, anything from a camera

The choice between PNG and JPEG predates PDF embedding by 25 years, but the consequence shows up in PDF size. A 5 MB JPEG becomes a 5 MB PDF; a 50 MB PNG of the same content becomes a 50 MB PDF. Picking the right format first is the highest-leverage size optimization for PDF-of-images workflows.

The fundamental difference

PNG is lossless: every pixel is preserved exactly. JPEG is lossy: small high-frequency details are quantized away.

For photographic content, the lossy quantization is invisible at typical viewing distance — JPEG at quality 85 looks the same as the original to a human eye, while being 5–10× smaller. For non-photographic content (text, diagrams, line art), the same quantization produces visible artifacts: ringing around sharp edges, blocking in flat regions, halos near text.

When PNG is the right call

When JPEG is the right call

Real numbers — same content, both formats

A 1920 × 1080 typical desktop screenshot:

A 1920 × 1080 family photo from a phone:

For the screenshot, PNG is both smaller AND better. For the photo, JPEG is dramatically smaller with no visible quality loss.

Hybrid content — neither format wins cleanly

A scanned document with a photo embedded in the body, or a slide deck with both photos and text annotations, lands awkwardly:

Two approaches to hybrid content:

  1. Use one format with smart defaults. JPEG at very high quality (95–98) reduces text artifacts to invisible while still keeping reasonable size for photo regions. The compromise file is 30–40% larger than pure-photo JPEG.
  2. JBIG2 / "MRC" compression. Mixed Raster Content separates text from photos and compresses each appropriately. Used in document scanners' "fast PDF" output and in commercial PDF compression tools. Not a fit for PNG2PDF — we work on input images, not pre-segmented content.

What PNG2PDF gets as input

Most PNGs uploaded to PNG2PDF are screenshots, logos, exported design assets — content that should be PNG. The tool preserves them losslessly. The resulting PDF is faithful to the input.

If you upload a photo as PNG (because that's what your screenshot tool happened to save it as, or because you exported it from Photoshop without thinking about format), the resulting PDF is unnecessarily large. To shrink it: re-save the image as JPEG at quality ~90 in any photo tool, then upload the JPEG to JPG2PDF instead. The JPEG-based PDF will be 5–10× smaller with no visible quality loss for photographic content.

For archival, prefer PNG

If you're building a PDF that will be the long-term canonical version of an image — archive, legal record, scientific dataset — keep PNG. The size cost is real but small compared to the cost of a generation of JPEG quantization losses you can never recover.

If the PDF is for sharing, viewing, or temporary distribution, JPEG-based for photos and PNG-based for graphics is the right mix.