Short answer: JPG or PNG?
Use JPG for photographs and other images with smooth gradients, where a small file matters more than a few discarded details. Use PNG for screenshots, logos, diagrams, text and anything that needs a transparent background or must stay pixel-exact. Converting a PNG photo to JPG usually shrinks it a lot; converting a JPG to PNG does not bring back detail the JPG already lost.
JPG and PNG compared
| Property | JPG | PNG |
|---|---|---|
| Compression | Lossy | Lossless |
| Transparency | No | Yes |
| Animation | No | No |
| File extensions | .jpg, .jpeg, .jpe, .jfif | .png |
| MIME types | image/jpeg | image/png |
| Developed by | Joint Photographic Experts Group | PNG Development Group |
| First released | 1992 | 1996 |
| What opens it | JPEG opens in every web browser, in Windows Photos, macOS Preview, the photo apps of iOS and Android, and in editors such as Photoshop and GIMP. | PNG opens in every web browser and image viewer, in Windows Photos, macOS Preview, and in editors from Paint to Photoshop and GIMP. |
Measured file sizes
These are file sizes we measured with NexMedia's own conversion engines, not estimates. In our test of 4 images, every file was converted at NexMedia's default settings, and each cell is the size of the file the converter produced.
| Sample | PNG source file | JPG (default settings) | PNG (default settings) |
|---|---|---|---|
| Photograph A (Kodak test set) | 503 kB | 54.6 kB | 642 kB |
| Photograph B (Kodak test set) | 558 kB | 50.9 kB | 866 kB |
| Screenshot of a web application | 37.2 kB | 34.3 kB | 39.6 kB |
| Flat-colour cartoon illustration | 269 kB | 17.6 kB | 360 kB |
| All samples together | 1.37 MB | 157 kB | 1.91 MB |
Across all 4 images together, PNG (default settings) came to 1,211% of the size of JPG (default settings).
PNG (default settings) was smaller than JPG (default settings) for 0 of the 4 images.
The samples
- Photograph A (Kodak test set). Released by Eastman Kodak Company for unrestricted usage. https://r0k.us/graphics/kodak/kodak/kodim03.png
- Photograph B (Kodak test set). Released by Eastman Kodak Company for unrestricted usage. https://r0k.us/graphics/kodak/kodak/kodim23.png
- Screenshot of a web application. CC0 1.0 (Wikimedia Commons, File:Screenshot of Glazba Modelling Homepage.png). https://commons.wikimedia.org/wiki/Special:FilePath/Screenshot_of_Glazba_Modelling_Homepage.png
- Flat-colour cartoon illustration. CC0 1.0 (Wikimedia Commons, File:Spot the cow.png). https://commons.wikimedia.org/wiki/Special:FilePath/Spot_the_cow.png
How this was measured
Engines: libvips 8.14.1 for images and ffmpeg 5.1.9-0+deb12u1 for audio and video, the builds inside NexMedia's conversion worker image. Measured on November 12, 2026.
Image settings were NexMedia's defaults: quality 82, with the lossless option off except where a column says lossless mode. The PNG column is a PNG written by NexMedia's converter (the source PNG went through a lossless TIFF step first), so it reflects NexMedia's PNG encoder rather than the tool that made the original file.
Progressive (interlaced) output is on by default, which typically makes PNG files larger than the same pixels saved without interlacing.
Quality is not measured here. A smaller file is not a better file: encoders trade size against detail differently, and the same quality number means different things in different codecs. Only lossless and uncompressed outputs keep every detail of the data they were given.
Results depend on the content of each file, so other files can give different sizes. Treat these numbers as one reproducible test, not as a rule.
When to choose which
Photos to share or upload
JPG is the usual choice: files are small, and every phone, browser and service accepts them. Some detail is discarded each time a JPG is saved again, so keep an original if you plan to edit.
Screenshots, logos and text
PNG stores every pixel exactly, so edges and text stay sharp. JPG adds visible smudges around hard edges, and it can make flat-colour graphics larger than a PNG.
Transparent backgrounds
Only PNG keeps transparency. JPG has no transparent pixels, so converting a transparent PNG to JPG fills the background with a solid colour (NexMedia uses white by default).
Editing and archiving
PNG is lossless, so it is a safe working format for images you will edit or save several times. Use JPG for the final copy you publish.
The formats
Convert between them
Converter and compression tools
More comparison guides
Frequently asked questions
Is PNG higher quality than JPG?
PNG is lossless, so it keeps every pixel of the image it was given, while JPG discards detail to save space. That makes PNG exact, not automatically better looking: a JPG saved at a high quality setting can be hard to tell apart from the original, at a much smaller size for a photograph.
Why is my PNG so much larger than the same picture as a JPG?
PNG compresses without discarding anything, which works well for flat areas and poorly for the noisy, detailed texture of photographs. The measured section above shows the difference for our samples.
Does converting JPG to PNG improve quality?
No. A PNG made from a JPG contains the same pixels, including the JPG's artefacts, and is usually larger. It is useful only when a program needs PNG or a transparent background.
What happens to transparency when I convert PNG to JPG?
JPG cannot store transparency, so the transparent areas are filled with a solid background colour. NexMedia's converter uses white unless you set a different background colour in the options.
