PNG vs JPG: Which to Use, Tested

PNG vs JPG: real KB numbers on a photo and a logo show exactly when each wins, plus transparency, resaving, and where WebP beats both formats.

By Mike Wiberg · · 14 min read

PNG vs JPG comes down to what is in the picture, not which format is better. JPG is lossy and built for photographs, producing files five to ten times smaller than PNG with no visible difference at normal size. PNG is lossless and keeps a full transparency channel, which makes it the right call for screenshots, logos, text, and anything with a hard edge.

People search this both ways, png vs jpg and the closely related what is a jpg vs png, and both want the same answer. This page gives you the mechanism behind that answer, not just the rule of thumb: how each format actually compresses, what happens to color, printing, and metadata, and the two places people get the comparison backwards. For the deeper mechanics of one side of that split, see PNG explained.

How PNG and JPG Compare at a Glance

PNG and JPG differ on every axis that decides which one to pick: how they compress, whether they hold transparency, what they cost you in file size, and what happens when you keep saving over the file.

Attribute PNG JPG
Compression Lossless, pixels preserved exactly Lossy, detail discarded permanently
Transparency Full alpha channel None, no workaround
Best for Screenshots, logos, text, line art Photographs
Typical size on a photo 5 to 10 times larger than the JPG Small, the format's whole point
Typical size on a flat graphic Often smaller than JPG Larger, plus visible artifacts
Re-saving No quality loss from the format itself Generation loss, degrades each save
Color depth Up to 48-bit truecolor, 64bpp with alpha 8 bits per channel, 24-bit truecolor
Animation Only through the APNG extension Not supported

How Does Each Format Actually Compress?

PNG predicts each pixel from the ones next to it, packs the leftover differences with DEFLATE, and throws nothing away, so decoding a PNG returns the exact bytes that were encoded. JPG takes the opposite approach: it converts color into a form your eye is less sensitive to, then rounds away fine detail block by block until the file is small, a step that cannot be undone once it happens.

PNG: Lossless, Pixel for Pixel

PNG's size depends on how predictable the pixels are. A screenshot with long runs of identical color collapses to almost nothing, because DEFLATE finds the repetition and packs it tight. A noisy photograph defeats that predictor almost completely, since neighboring pixels rarely match closely enough to compress well. PNG supports color depths up to 48-bit truecolor, and up to 64 bits per pixel once you include the alpha channel, well beyond what a screen or a JPG can show (Wikipedia: PNG).

JPG: Lossy and Built for Photos

JPG is the most widely used lossy format for still images, and it earns that spot on photographs specifically, where it typically achieves around 10:1 compression with a quality loss most people cannot see at normal zoom (Wikipedia: JPEG). That ratio is also why saving a screenshot or a line-art diagram as JPG usually disappoints. Lossy compression targets photographic noise, and text or diagrams have none of it, so the format spends its budget on the wrong thing and returns a blurrier result than the source (MDN: Choosing an image format).

Does PNG or JPG Support Transparency?

PNG does, JPG does not, and there is no workaround on the JPG side, in any variant, at any quality. PNG's alpha channel stores up to 256 levels of opacity per pixel, which is what lets a logo or a drop shadow fade smoothly over any background instead of sitting inside a hard rectangle.

JPG has no alpha channel at all (Stack Overflow: transparent PNG to JPG), so a transparent area gets filled with a solid color, almost always white, the moment the file becomes a JPG. Indexed PNG-8 files can carry alpha too, per palette entry, which surprises people who assume only full 32-bit PNG can be transparent; that belief is left over from export tools that never wrote the data, not an actual format limit. Compressing a PNG here keeps its alpha channel intact, because the PNG path is a lossless re-encode rather than a format switch, so nothing about the transparency changes.

Which Format Makes a Smaller File?

It depends on what is in the image, not on a fixed ranking between the two formats. Take our own reference photo, a 4.5 MB phone shot: at quality 80, our default and the setting we treat as visually lossless for a photograph, it comes back around 0.9 MB as a JPG. Saved as PNG instead, the same photo runs 4.5 to 9 MB, five to ten times heavier, because PNG cannot discard the sensor noise a lossy encoder throws away for free.

Same 4.5 MB photo, three formats output size by format, same source file PNG ~9 MB JPG, quality 80 0.9 MB WebP 0.63 MB PNG shown at the upper bound of the 5 to 10x PNG-vs-JPG rule; WebP applies the 25 to 35% WebP-vs-JPEG saving. Measured against imagecompressor.tools defaults, 2026-07-16.
Format Same 4.5 MB photo Why
PNG ~9 MB Lossless, cannot discard photographic noise
JPG, quality 80 0.9 MB Lossy, our default and visually lossless setting
WebP ~0.63 MB 25 to 35% smaller than an equivalent JPG, our own default-quality comparison

Point both formats at a flat graphic instead and the ranking can flip. For images with large areas of solid color and sharp transitions, PNG's predictor has far less noise to fight, and it can beat JPG outright while avoiding the fuzz JPG leaves around hard edges. Color reduction pushes that gap further: pngquant's own published example takes a 75,628 byte PNG down to 19,996 bytes, a 73 percent cut, from a well-chosen 256-color palette alone, an option JPG does not have. That is the flat-graphic case in miniature: a logo or icon does not need the millions of colors a photo does, so a smart PNG encoder can throw most of the file away without losing anything the format promises to keep.

What Happens When You Keep Re-Saving the File?

PNG does not degrade no matter how many times you resave it, because the format's own compression never discards pixel data. JPG loses a little more with every save, since each pass reruns the lossy rounding step on pixels that already went through it once. Ten resaves of a JPG and the damage is visible; ten resaves of a PNG are byte-for-byte identical to the first, provided nothing else touched the file.

One nuance breaks the clean "PNG is always safe" story. Popular PNG tools like pngquant get their savings from color quantization, reducing the palette to 256 colors or fewer, and that step is lossy even though the file that comes out is still a valid, fully lossless PNG by the format's own rules. The format's compression is lossless; a specific tool's workflow is not always, so check what a PNG optimizer actually does before assuming zero quality cost.

Do PNG and JPG Handle Color, Printing, and Metadata the Same Way?

Not quite. Both store color as RGB rather than the CMYK model a print shop expects, and both can carry metadata, but they carry it differently and to different depths.

Color Depth and Printing in CMYK

PNG supports up to 48-bit truecolor, 64 bits per pixel once alpha is included; JPG tops out at 8 bits per channel, 24-bit truecolor, about 16.7 million colors (Wikipedia: PNG). Neither format was designed for print separation. If a print shop asks for CMYK, they mean the four-ink color model professional presses use, and neither PNG nor JPG stores color that way natively, so expect a conversion step in your image editor before the file goes to press, regardless of which one you started with.

EXIF and Other Metadata

JPG natively carries EXIF, the camera-written metadata block that can include GPS coordinates, camera model, and capture time. PNG was not built around EXIF the same way; it stores auxiliary data in its own text chunks, so metadata does not carry over cleanly if you convert a JPG with EXIF into a PNG. On our own tool, that distinction rarely matters in practice: we strip EXIF by default on every compression, PNG or JPG, so the metadata question is answered for you before you ever see the output file.

Can PNG or JPG Be Animated?

Only PNG has a path to animation, and it is a narrow one. The APNG extension adds frame data to a PNG file while staying readable as a static image in software that does not support the animated part, but APNG never became a universal standard the way GIF or animated WebP did, so support is inconsistent across older software and some image pipelines. JPG has no animation path at all, in any form.

In practice, if animation matters, PNG's APNG extension is rarely the first choice today. WebP's animated mode has broader modern browser support and typically produces a smaller file for the same motion, which is part of why the comparison increasingly runs three-way rather than two.

Is a 100% Quality JPG the Same as a PNG?

No. A JPG saved at 100 percent quality still went through the same lossy, block-based rounding every other JPG does; it just discarded less detail than a lower setting would, not zero detail. The file will look nearly identical to the source at normal viewing size, but it is not a byte-for-byte match, and it does not gain a transparency channel or PNG's guarantee of exactness just because the quality slider is maxed out.

This matters most when someone re-saves a JPG at 100 percent thinking they have made it "lossless" again. They have not. The damage from any earlier lossy save is already baked in, and the 100 percent pass adds its own rounding on top, however small. If you need an exact, verifiable copy of a file, PNG is the only one of these two formats that actually delivers it.

PNG vs JPG: Which Should You Use?

PNG wins on anything with sharp edges or transparency; JPG wins on photographs headed for the web, print, or an inbox.

Situation Use
Photograph for web, print, or sharing JPG
Logo or icon with a transparent background PNG
Screenshot or text-heavy graphic PNG
Chart, diagram, or line art PNG
Photo that also needs a transparent edge Neither, use WebP

When to Use PNG vs JPG

The short version: ask whether the file needs transparency first. If it does, JPG is out entirely and you are choosing between PNG and WebP. If it does not, ask whether the content is a photograph or a graphic. Photographs go to JPG for the size savings; graphics, screenshots, and anything with flat color or text go to PNG for the sharp edges and the guarantee that resaving never costs you quality. The one case that splits both ways, a photo that also needs to sit on a transparent background, is exactly where WebP earns its place instead of forcing a PNG-sized file just to keep the alpha channel.

What About WebP and AVIF?

WebP is the honest complication in a PNG vs JPG comparison. It carries full alpha transparency the way PNG does, and its lossy mode still runs 25 to 35 percent smaller than an equivalent JPG at the same visual quality (Google WebP Compression Study), so it beats both formats on size without forcing the transparency-versus-size tradeoff PNG and JPG hand you. AVIF pushes further still, often landing around 50 percent smaller than JPG, at the cost of slower encoding.

The catch with both is compatibility. Some older software, certain print workflows, and a handful of picky upload forms still expect one of the two classic formats by name, which is exactly why PNG and JPG remain the safe defaults everywhere else. Where you control both ends of the pipe, your own website, an app you built, an internal tool, WebP or AVIF is usually the better default than either PNG or JPG.

What Does Our Tool Do Differently With Each Format?

Compressing a PNG here is a lossless re-encode: pixels come back exactly as they went in, packed tighter, with metadata stripped. Compressing a JPG is lossy at quality 80 by default, the setting we treat as visually lossless for a photograph, which is why a typical phone photo comes back 60 to 80 percent smaller with nothing you can see at normal zoom.

Both paths run through the same engine, and switching the output format is a dropdown, not a separate tool. I test PNG against JPG on the same source file constantly while working on this site, and the only real cost of trying both is a glance at the after size.

Questions

Is PNG better quality than JPG?

Only in the sense that PNG never throws anything away. For a photograph, JPG at quality 80 looks identical to the source at normal viewing size while running a fraction of the file size, so bigger file and better quality are not the same claim. PNG's advantage is guaranteed exactness, which photographs rarely need and graphics almost always do.

Why use PNG over JPEG?

Use PNG when the image needs transparency, sharp text or line edges, or a guarantee that saving it again will never cost you quality. Screenshots, logos, and diagrams all fall into this group, and JPG's lossy compression tends to blur or fuzz exactly the edges those formats depend on.

Does PNG lose quality?

No, not from the format's own compression, which is lossless by design and returns the exact pixels every time you decode it. The one exception is a specific workflow: tools that reduce a PNG's color palette to save space, like pngquant, are making a lossy choice even though the resulting file is still a valid PNG.

Is it better to save art as PNG or JPG?

PNG, in almost every case. Digital art tends to have flat color areas and hard edges, which is exactly what PNG's lossless compression handles well and JPG's lossy compression handles badly, and PNG protects the sharp lines if the art needs a transparent background too.

Can a JPG have a transparent background?

No, in any variant, at any quality setting. The JPG standard has no alpha channel, so a transparent area always gets filled with a solid color, usually white, the moment the file becomes a JPG. Use PNG instead, or WebP if size matters too.

One Rule to Remember

Photographs go to JPG for the size savings; anything with a hard edge, flat color, or a transparent background goes to PNG for the exactness. WebP is worth a look the moment you control both ends of the pipe, since it can replace either format on your own site or app without forcing the transparency-versus-size tradeoff PNG and JPG hand you everywhere else.

The two places people get this comparison backwards are the two axes this page spent the most time on: assuming a maxed-out JPG becomes lossless, and assuming PNG is always the safer, higher-quality pick no matter what is in the file. Neither holds up once you look at the actual bytes, which is the entire point of measuring instead of guessing. If the file in front of you is a PNG that only needs to get smaller without losing a pixel, compress it here and compare the before and after byte counts yourself.