What youβll learn in this post:
- The four questions that decide which format to use
- What lossy and lossless really mean for your files
- A side-by-side table of all seven formats
- Which conversion to run for the most common situations
Most people never choose an image format. The camera, the screenshot tool or the website chooses for them, and the problem only appears later: the file is too big, wonβt upload, wonβt open, or has a black box where the transparency used to be.
You donβt need to memorise how each codec works. You need four questions, asked in order.
The four questions
1. Does it need transparency?
If yes, rule out JPG: a JPG is always a full rectangle. PNG, WebP, AVIF, JPEG XL and APNG keep smooth, see-through edges. GIF can only make a pixel fully transparent or fully solid, so soft shadows end up jagged.
2. Does it move?
For animation you can use WebP, AVIF, JPEG XL, APNG or GIF. GIF is the most compatible and the heaviest. A plain PNG or JPG holds a single picture.
3. Do you want the smallest file or the exact pixels?
- Lossy formats throw away detail your eye is unlikely to miss, giving the smallest files. Each lossy re-save loses a little more.
- Lossless formats keep every pixel exactly, so you can save again and again without degrading anything. The price is a bigger file.
WebP, AVIF and JPEG XL can do both. JPG is lossy only; PNG, GIF and APNG are lossless (GIF within a 256-colour palette).
4. Who has to open it?
JPG, PNG and GIF open almost everywhere. WebP, AVIF and APNG suit modern browsers. JPEG XL has the fewest viewers, and many editors, phone galleries and web forms wonβt recognise it.
All seven side by side
| Format | Compression | Transparency | Animation | Typical use | Support |
|---|---|---|---|---|---|
| PNG | Lossless | β Full | β Not in plain PNG | Screenshots, logos, graphics | β Everywhere |
| JPG | Lossy | β None | β | Photographs | β Everywhere |
| WebP | Lossy or lossless | β Full | β Yes | Websites and apps | β Modern browsers |
| AVIF | Lossy or lossless | β Full | β Yes | Smallest web images | β Modern browsers |
| JPEG XL | Lossy or lossless | β Full | β Yes | High-quality archives | β Limited viewers |
| GIF | Lossless, 256 colours | β On or off | β Yes | Legacy animations | β Everywhere |
| APNG | Lossless | β Full | β Yes | Animated graphics | β Modern browsers |
Situations, and the conversion that fits
| Situation | Convert | Why |
|---|---|---|
| Website logo or UI graphic that needs transparency and a lighter download | PNG β WebP | WebP keeps transparency and is widely supported |
| Large hero images where every kilobyte counts, modern browsers only | PNG β AVIF or JPG β AVIF | AVIF usually gives the smallest files, but encodes more slowly |
| A screenshot of a photo saved as PNG | PNG β JPG | PNG can be several times bigger than JPG for photographic content; choose a background colour for any transparent areas |
| A photo you plan to edit many times | JPG β PNG | A lossless working copy stops further loss (it doesnβt restore detail) |
| Archiving PNGs in less space with identical pixels | PNG β JPEG XL (lossless) | Lossless JPEG XL is typically much smaller than the PNG |
| A web image your editor or messenger refuses | WebP β PNG or WebP β JPG | The most compatible answers |
An .avif that older software canβt open | AVIF β JPG or AVIF β PNG | JPG for sharing, PNG for a copy that never loses quality |
A .jxl to send to someone | JPEG XL β JPG | JPG opens on practically everything |
Common mistakes
- Expecting a conversion to sharpen a picture. A conversion canβt bring back colours or detail the source format already threw away. JPG β PNG simply freezes the JPG as it is today.
- Converting lossy to lossy repeatedly. Every lossy save adds a little loss. Keep your best copy and make smaller versions from it.
- Using GIF for photos. A 256-colour palette bands skies and skin tones. Use GIF only where it is required, and try dithering to soften banding.
- Replacing originals with a format your audience canβt open. Keep the original, convert a copy, and check it in the app where it will be used.
- Forgetting the background. A transparent PNG has no colour of its own. Going to JPG forces you to choose one, and a mismatched choice shows up as a halo.
A sensible default setup
If you just want rules of thumb:
- Archive masters you will edit: PNG (or lossless JPEG XL if your tools support it).
- Photos for the web: WebP for broad support, AVIF where you only care about modern browsers and small size.
- Anything that must open anywhere: JPG for photos, PNG for graphics.
- Animation: animated WebP or AVIF for the web, GIF only where nothing else is accepted. The animated-image guide covers this in depth.
The verdict
Four questions (transparency, motion, size versus exactness, audience) settle almost every choice. When the answer is βI picked wrong,β conversion is cheap, as long as you start from the best copy you have and keep the original. Each of the seven formats has its own converter page with the six conversions that make sense for it:
PNG Β· JPG Β· WebP Β· AVIF Β· JPEG XL Β· GIF Β· APNG
What to read next
- 42 Ways to Convert an Image β a tour of every converter and its settings
- Shrink Animated GIFs Without Losing the Motion β moving animations to modern formats
- Zip and Unzip Without Installing Anything β bundle your converted files
Ready to convert?
- All Image Converters β all 42 on one page
- Find Duplicate Images & Videos β clear out the extras before you convert a whole library