JPG, PNG, WebP or AVIF: Which Image Format Should You Use?
By PixSplit · Published
Every image format is a trade between file size, quality, features and compatibility. There is no single best format, but there is nearly always a best format for a particular job. This guide explains the differences in plain terms so you can choose in a few seconds.
Two ideas that explain everything
Lossy or lossless. A lossy format makes the file smaller by discarding detail that is hard to see. A lossless format keeps every pixel exactly, so the file is larger. Lossy suits photographs, because they are full of subtle gradients that hide the loss. Lossless suits screenshots, logos and diagrams, where sharp edges and flat colours would show every flaw.
Transparency. Some formats can store areas that are see-through, which you need for a logo placed over a coloured background. Others fill those areas with a solid colour.
The formats one by one
JPG (or JPEG). The universal photo format. It is lossy, has no transparency and opens in practically every app, printer and website that exists. At a quality setting of about 80 to 90, most photos look the same as the original at a fraction of the size. Its weakness is repeated saving: each time you edit and re-save a JPG, a little more detail is lost.
PNG. Lossless, with transparency. It is the right choice for screenshots, logos, icons and text, and it stays sharp however often you save it. For a photograph it is a poor choice, because the file can be several times bigger than the same photo as a JPG.
WebP. A modern format from Google that can work in either mode, lossy or lossless, and supports transparency. Typically a lossy WebP is noticeably smaller than a JPG of similar quality, which is why many websites serve it. All current major browsers display it. The catch is that some older programs, printers and upload forms do not recognise it, which is why people so often end up with a WebP file they cannot open.
AVIF. A newer format that often compresses better still, especially at low file sizes, and also supports transparency. It takes longer to create and is less widely supported outside browsers, so it is best for web pages you control and less useful for files you plan to send to other people.
HEIC. The default format for photos on recent iPhones and iPads. It stores photos in roughly half the space of a JPG at similar quality. It is not supported by default on many Windows, Android and web services, so you will usually want to convert it to JPG before sharing.
A quick chooser
- Sharing or uploading a photo to a form, email or print service: JPG.
- A screenshot, logo, diagram or anything with text: PNG.
- An image on your own website, where speed matters: WebP, or AVIF if you are happy to give up some compatibility.
- A logo with a transparent background that must stay small: WebP, or PNG if it must open everywhere.
- An iPhone photo that will not open on another device: convert the HEIC to JPG.
- A WebP or AVIF you saved from a website and cannot open: convert it to JPG, or to PNG if it has transparency.
What converting does and does not do
Converting does not improve an image. Turning a JPG into a PNG cannot bring back detail the JPG already discarded; it only stops further loss and usually makes the file bigger. Converting a PNG with transparency to JPG fills the transparent areas, normally with white. Converting a JPG to another lossy format compresses it a second time, so start from the best original you have when you can.
Renaming a file does not convert it. Changing photo.png to photo.jpg in the file name leaves the contents unchanged, and many uploads detect this and reject the file. Use a converter that actually re-encodes the picture.
Images and PDFs
The same logic applies when you move between images and PDFs. Turning PDF pages into pictures with PDF to JPG suits scans and photo pages, while PDF to PNG keeps text and diagrams crisp. Going the other way, JPG to PDF and PNG to PDF combine pictures into one document. Photos of paper documents stay smaller as JPG, and screenshots of text look better as PNG.
Choosing a quality setting
For lossy formats, a quality of about 80 to 90 keeps photos looking like the original for most uses. Drop to 70 or 75 for web pages and email attachments where size matters more than the last bit of detail. Going above 95 makes files much larger with almost no visible gain, unless you plan to edit the image again.
If you need an exact file size rather than a quality, see our guide to meeting upload size limits. If you are not sure how big your image should be in pixels, the guide to pixels, DPI and image size covers it.
Converting privately
All of the converters on this site run in your browser, so the pictures are never uploaded. That is useful for photos of documents, children or your home, where you would rather not send copies to someone else’s server.