How Image Conversion Works
Converting an image from one format to another is not a rename. Underneath, the source file is decoded into a raw pixel grid in memory, then that grid is re-encoded by the target format's rules. The output can be smaller or larger, sharper or softer, transparent or flattened, all depending on the two codecs involved and the quality settings applied.
Definition
Image conversion is the two-step process of decoding a source image into an uncompressed pixel buffer, then encoding that buffer using a different format's compression scheme, color handling, and metadata rules.
Why it matters
Understanding the round trip explains everything users find confusing: why lossy → lossy loses more than expected, why alpha sometimes disappears, why a 'converted' file can be bigger than the original, and why doing the whole thing in the browser is faster and more private than uploading to a server.
Advantages
- In-browser decoding keeps the original file on the user's device
- No upload wait means near-instant results for typical sizes
- Modern browsers expose codecs for JPG, PNG, WebP, and increasingly AVIF
- Re-encoding can genuinely reduce size when moving to a more efficient format
Disadvantages
- Every lossy re-encode discards a little more data
- Format-specific features (metadata, color profiles, alpha) can be lost in translation
- Very large images can strain memory in the browser tab
- Codec quality varies across browsers, so byte-identical output is not guaranteed
Examples
- PNG to WebP: decode PNG pixels, then re-encode with WebP's VP8 compression
- JPG to PNG: decode JPG (already lossy) into pixels, then wrap them losslessly as PNG, no quality regained
- WebP to JPG: decode WebP, discard alpha, re-encode as opaque JPG
- PNG to JPG for email or upload compatibility: decode PNG, flatten transparency against a chosen background, re-encode as JPG
Common misconceptions
- Conversion is not a simple file-extension change; the bytes are entirely rewritten
- Converting a lossy JPG to lossless PNG does not restore lost detail, it just preserves what remains
- Doing conversion in-browser does not mean uploading, the file stays on your device
- A 'converted' file is not always smaller; it depends on the target format's fit for the content
Frequently asked questions
No. The file is decoded and re-encoded locally in the browser tab; nothing leaves the device.
The target format is a worse fit, for example, converting a photo from JPG to PNG almost always inflates size.
No. Conversion can preserve or degrade, but it cannot recover detail that lossy compression has already thrown away.
Any lossless-to-lossless round trip, like PNG to WebP-lossless. Anything involving JPG or lossy WebP will lose more data on each save.