JPG, PNG or WebP: which image format to use and when
Choose by what the picture contains: JPG or lossy WebP for photographs, PNG or lossless WebP for screenshots, text and flat graphics, SVG for anything drawn as shapes. Converting never restores detail a lossy format has already removed.
ConvertBoxPublished
Lossy and lossless: the split that decides most cases
A lossy format throws away detail the eye is unlikely to notice and stores an approximation. A lossless format reproduces every pixel exactly and only removes redundancy. JPG is always lossy, PNG is always lossless, and WebP has both modes in one format.
Which one wins depends on the picture. A photograph is full of noise and gradual change, which lossless compression cannot shorten much but lossy compression hides well. A screenshot is the opposite: large areas of identical pixels and hard edges, which lossless compression packs tightly and lossy compression visibly damages, leaving grey speckles and halos around letters.
JPG, PNG and WebP compared
Read the table by rows that matter to you. If you need transparency, JPG is out. If the file must open in software you do not control, WebP is the risk.
| JPG | PNG | WebP | |
|---|---|---|---|
| Compression | Lossy | Lossless | Lossy or lossless |
| Transparency | None | Full alpha channel | Full alpha channel in both modes |
| Colour | 8 bits per channel | 8 or 16 bits per channel, or a palette of up to 256 colours | 8 bits per channel |
| Animation | No | No, apart from the APNG extension | Yes |
| Strong on | Photographs | Screenshots, text, line art, logos | Web images of both kinds |
| Weak on | Sharp edges, text, repeated re-saving | Photographs, which come out several times larger | Older software, print services, images over 16383 pixels per side |
Decision rules by content type
- Photograph: JPG when it must open anywhere, such as email, forms and print services; lossy WebP when it is going on a website you control.
- Screenshot, diagram or anything with small text: PNG. If it is still too large for the web, lossless WebP is usually smaller with identical pixels.
- Logo or icon: SVG if a vector original exists. Otherwise PNG, or WebP when a transparent background has to stay small.
- UI asset or sprite with transparency: PNG for the widest tool support, WebP for a smaller download in a web app.
- Picture that mixes a photo with text, such as a banner or a slide: export at high quality in JPG or WebP and check the letter edges at 100% zoom; if they look dirty, use PNG and accept the size.
Where AVIF, GIF and SVG fit
Three more formats come up often enough to place on the map. None of them replaces the three above for everyday files.
- AVIF: built on the AV1 video codec. It usually beats WebP on photographs at low file sizes and supports 10-bit colour and HDR. Current browsers display it, but encoding is slow and support outside browsers is patchier than for WebP.
- GIF: limited to 256 colours per frame with on-or-off transparency. Its only remaining use is simple animation that has to play anywhere; for a static picture PNG is better in every respect, and for long clips a video file is far smaller.
- SVG: not pixels but a description of shapes and text, so it stays sharp at any size and is often tiny. It suits logos, icons and charts and cannot represent a photograph.
Typical size relationships, with the arithmetic
Start from the uncompressed size. A 1920 x 1080 picture has 2,073,600 pixels, and at three bytes per pixel that is 6,220,800 bytes, about 6.2 MB. Every format is a way of getting below that number. For a photograph of this size, a PNG commonly stays at several megabytes because noise does not compress, while a JPG at quality 80 to 85 lands in the hundreds of kilobytes. Lossy WebP is often around a quarter to a third smaller than a JPG of similar visual quality, though the gain varies from image to image.
For a screenshot of the same dimensions the order reverses. A settings window with flat panels can be a PNG of a hundred kilobytes or two, and a JPG that small would show obvious artifacts around the text. A logo with a handful of colours can even grow when converted from PNG to JPG while looking worse.
What re-saving and converting really do
Every save in a lossy format is a new approximation of the previous one, so errors accumulate: open a JPG, edit it and save it as JPG ten times and edges soften and blocks appear. Lossless formats do not have this problem. That is the one good reason to convert a JPG to PNG: the picture stops degrading during editing. It does not bring detail back, it does not create transparency, and the file gets several times larger.
Tools differ in what they let you control. The ConvertBox image converter writes JPEG, PNG or WebP with a quality slider from 10 to 100 that starts at 92 and applies to JPEG and WebP only; it reads AVIF in current browsers but does not write it, and animated files are reduced to their first frame. The dedicated JPG to WebP, PNG to JPG and JPG to PNG pages have no slider and use a fixed quality of 92 for lossy output, a setting chosen for fidelity rather than small files. Converting to JPG fills transparent areas with white, and the fill colour cannot be changed there.
Common mistakes and how to spot them
- A photo saved as PNG: the file is several megabytes for no visible benefit. Convert it to JPG or WebP.
- A screenshot saved as JPG: zoom in on small text. Coloured fringes and grey dust around the letters mean it should have been PNG.
- A WebP that is no smaller than the JPG it came from: a low-quality JPG re-encoded at a high WebP quality reproduces the JPEG artifacts faithfully. Lower the WebP quality to roughly 75 to 85, or start from a better original.
- A logo that vanished after conversion to JPG: white artwork on a transparent background becomes white on white. Place it on the intended background colour in an editor first.