FORMAT COMPARISON

PNG vs JPG: Transparency, Photos and Export Choices

Choose according to transparency, acceptable image changes and the delivery workflow. The original image pair below demonstrates one specific export condition.

Key differences

PropertyPNGJPG
MIME typeimage/pngimage/jpeg
EncodingBinary chunksNot applicable
ContainerNot reviewedJPEG marker stream; commonly JFIF or Exif-oriented
Compression / codingLosslessUsually lossy JPEG coding; the family also defines lossless processes
Signature89 50 4E 47 0D 0A 1A 0A (offset 0)FF D8 (JPEG Start of Image)

Unavailable catalog facts remain marked “Not reviewed” instead of being guessed.

Choose by workflow

Choose PNG when

You need alpha transparency or lossless reproduction of text, screenshots or line art.

Choose JPG when

You are delivering an opaque photograph and accept lossy encoding after checking the exported result.

Verify before choosing

Export the same source in your actual encoder. Inspect fine edges, the chosen background and the delivered file size.

Try the same pixels with and without transparency

The PNG below has transparent, half-transparent and opaque areas. The JPEG starts from those same pixels, composites them onto white, and uses a fixed quality setting. Place each over a checkerboard to see the background difference.

PNG with transparency
PNG with transparency ↓
16516 bytes · image/png
f27901db77967c0811a37457a9aac8eeda2282bca15fb3f53d772ba0210cc675
JPEG with white background
JPEG with white background ↓
786 bytes · image/jpeg
a5b9d001c117edb18a999182b5b8ef419772bb5dc74165c44386cfc56f711f39
Reproduce this comparison

Original 64 × 64 RGBA pixels. PNG retains alpha and uses a deliberately unoptimized stored DEFLATE block. JPEG is composited onto white using rounded channel values, then encoded with jpeg-js at quality 85. The dependency lockfile fixes the encoder version. File sizes describe these specific encoding choices.

Created for Format Odyssey and dedicated to the public domain under CC0 1.0. CC0 1.0 Universal.

Common use cases

  • PNG: transparent graphics and precise raster details.
  • JPG: opaque photo delivery with an accepted quality setting.

Compatibility and workflow

Confirm that the recipient accepts the format and renders color as expected. Keep the editable source when preparing delivery copies.

Limitations to check

These two tiny fixtures demonstrate alpha flattening. Their sizes do not predict the outcome for photographs or other encoders.

Continue with each guide

Portable Network Graphics · JPEG Image

Sources