
PNG to JPG
Flatten a PNG into a JPG. Transparency has nowhere to go and arrives as a solid block, and hard edges are the exact thing JPEG rings around.
PNG to JPG hands JPEG exactly the picture JPEG handles worst. A screenshot or a logo is flat colour meeting a hard edge, and the smoothing leaves a faint halo along every one of those edges. The see-through parts arrive as a solid block, since a JPG has nowhere to put them.
Questions
What happens to a PNG with transparency?
The alpha channel has nowhere to go, since JPEG has no transparency channel at all. Whatever sat behind a transparent area is flattened into a solid block instead of staying see-through.
What quality is lost?
Hard edges and flat color regions, the kind of content PNG stores exactly, are what block-based JPEG compression rings and smudges around. At the default quality of 80 this is usually mild, and it becomes more visible when the quality option is lowered. Metadata is dropped either way.
Which engine handles this?
jSquash decodes the PNG and writes the JPEG through a WebAssembly build of mozjpeg. This runs in Node, on the command line, through MCP and in the browser, unlike the video and audio pairs that need WebCodecs.
How much smaller does the file get?
Often much smaller, since PNG is lossless and JPEG is not; a photographic PNG can shrink to a fraction of its size at quality 80. A PNG that is mostly flat graphics or text shrinks less, since that is exactly the content JPEG compresses worst.
What is the reverse page?
JPG to PNG goes back the other way, though it cannot restore anything this conversion discarded. It only stops further loss from that point on.