Guide · Format choice

JPG, PNG or WEBP: Choosing an Image Format

Start with the formats your recipient or software accepts. Then consider the image itself: a photograph, sharp-edged text or graphics, or something that needs transparency. File size and whether you will edit it again also affect the choice.

JPGlossy · no alpha PNGlossless · alpha WEBPeither · alpha

JPG is often useful for photographs, PNG for text and lossless pixel storage, and WEBP for compact web images. None guarantees the smallest file for every image. Compare the output at the quality and dimensions you actually need.

What lossy and lossless mean

Lossless compression preserves the pixel values given to the encoder, using patterns and repeated data to store them more compactly. PNG and lossless WEBP work this way. Saving unchanged pixels losslessly does not introduce compression damage, but resizing, colour conversion or other edits before encoding can still change them.

Lossy compression discards some image information to reduce file size. JPG transforms blocks into frequency components and quantizes them, often retaining broad changes more accurately than fine detail. It also commonly reduces colour resolution relative to brightness. At suitable settings, the result can be much smaller with little visible difference; the image and quality setting determine the trade-off.

Lossy encoding often suits photographs, but it can blur text or leave halos around sharp edges. Lossless encoding preserves those edges exactly as supplied to the encoder, usually at a greater storage cost for detailed or noisy photos.

Where each format fits

JPG is widely used for photographs. It compresses continuous tones and natural scenes efficiently and is accepted by many applications. It does not support an alpha channel for transparency. High-contrast text and line art can show ringing or smudging, especially at lower quality settings.

PNG suits screenshots, diagrams and transparency. It preserves encoded pixels without lossy compression, including text, lines and flat colour. The eight-bit PNG output used here supports 256 levels of transparency; PNG as a format also supports higher bit depths. Detailed photographs can produce large PNG files.

WEBP suits web delivery when the receiving software supports it. It offers lossy and lossless modes and transparency, and often produces smaller files than comparable JPG or PNG exports. Savings depend on the image and settings. Some desktop, print and upload workflows still require another format. The lossy WEBP bitstream has a 16,383-pixel limit per side; the lossless specification allows 16,384. A browser’s encoder may be more restrictive.

Why photo PNGs can be large

Photographs contain fine variations, including sensor noise. A lossless encoder must preserve them, even when they are barely visible. That leaves fewer simple patterns to compress than in an image made of large, uniform areas and sharp lines.

A camera photo saved as PNG can be several times larger than a high-quality JPG of the same dimensions. If size is the problem, try a JPG conversion and compare the actual files and image quality before replacing the PNG.

For a screenshot or text-heavy graphic, try PNG before choosing JPG. JPG may introduce halos or soften letters; the size saving is not guaranteed to justify those changes. Compare at the size the image will be viewed or printed.

Repeated lossy exports

A lossy re-encode works from the information left by earlier edits and exports, so damage can accumulate. Blockiness in smooth areas and halos around text or hard edges are common signs. There is no fixed number of saves at which the damage becomes visible.

An edit that re-encodes JPG can recompute its compression blocks from an already-lossy image. A crop that shifts the block alignment can make the result worse. Check whether the editor is performing a lossy export; copying a file without re-encoding it does not cause this loss.

Keep the best original or master copy and export new delivery files from it. Converting a JPG to PNG does not restore discarded detail or remove existing compression artifacts. It preserves the decoded result without adding PNG compression loss, which can be useful for further editing, but it does not repair earlier damage.

A practical choice list

For a photograph, consider JPG. It offers broad compatibility and useful size savings. Choose a quality setting that suits the image and inspect the result rather than assuming the loss will be invisible.

For screenshots, diagrams, charts, text scans or line art, consider PNG. It avoids lossy artifacts around edges. Photo-like scans can still be large, and further editing can change pixels even when the final encoding is lossless.

For transparency, use a format that supports alpha. PNG is widely useful for logos, icons, cut-outs and overlays. WEBP can combine transparency with lossy colour compression when the receiving application supports it; JPG cannot retain an alpha channel.

For website images, compare WEBP with your alternatives. It can reduce transfer size while retaining transparency. Keep an appropriate JPG or PNG copy when people may need to download the image for software that does not support WEBP.

For another person, an upload form or a printer, check the accepted formats. JPG and PNG are common choices, but size, resolution and colour requirements can also apply. A compatible extension alone does not guarantee acceptance.

For repeated editing, keep a suitable master. PNG can preserve decoded pixels losslessly, but it is not a substitute for an original with higher bit depth, metadata or editable layers. Make lossy delivery copies from the master rather than repeatedly editing the last export.

Make delivery conversions after editing, and keep the master separate. Open the exported file, check its dimensions and appearance, and compare its size before choosing which copy to send.

Related