The short answer
Use JPG for photos and PNG for graphics: logos, icons, screenshots, diagrams, text and anything that needs a transparent background. A photo as JPG is small and looks good. A screenshot as PNG is sharp and often smaller than the same screenshot as JPG.
| JPG (JPEG) | PNG | |
|---|---|---|
| Compression | Lossy: detail is thrown away to save space | Lossless: every pixel is kept exactly |
| File size for photos | Small | Large, often 2 to 5 times the JPG |
| File size for graphics | Medium, with blurry edges | Small and sharp |
| Transparency | No | Yes, including partly transparent pixels |
| Quality after repeated saves | Drops a little each time | Never changes |
| Colors | 16.7 million (8 bits per channel) | Up to 16 bits per channel, or a 256 color palette |
| Camera data (EXIF) | Common | Rare |
| Animation | No | Only as APNG |
| Best for | Photos, social media, email | Logos, screenshots, text, edits, transparency |
Lossy and lossless compression
JPG splits the image into blocks of 8 × 8 pixels and keeps the changes in brightness that the eye notices most, while it simplifies fine color detail. At a quality of about 80 most people cannot see the difference in a photo, and the file is a fraction of the size. The price is visible on sharp edges: text, lines and flat color areas get blurry halos and blocks, called artifacts.
PNG uses lossless compression, similar to a ZIP file. It looks for repeated patterns, so large areas of the same color compress very well and noisy photo detail compresses badly. The image you open is exactly the image that was saved.
File size in practice
- A phone photo of 12 megapixels is usually around 2 to 5 MB as JPG and around 12 to 25 MB as PNG.
- A screenshot of a web page or an app is usually smaller as PNG than as a good quality JPG, and it stays sharp.
- A logo with a few flat colors is often only a few kilobytes as PNG.
Converting a photo from JPG to PNG therefore makes the file bigger without making it look better. Converting a screenshot from PNG to JPG makes the text worse, and sometimes the file bigger too.
Transparency
PNG has an alpha channel: every pixel can be fully solid, fully transparent or anything in between. That is what lets a logo sit on any background with smooth edges. JPG has no alpha channel, so transparent areas are always filled with a color, usually white or black. To get transparency from a JPG, the background has to be removed, for example with JPG to transparent PNG.
Editing and saving again
Every time a JPG is opened and saved, it is compressed again and loses a little more detail. After many saves the artifacts become visible. When you work on an image in several steps, keep a PNG (or your editor's own format) while you work, and export a JPG only at the end.
For websites
Page speed matters for visitors and for search rankings, so file size counts. Photos should not be PNG on a website. Use JPG, or better WebP or AVIF, which are 25 to 50 percent smaller at the same quality and also support transparency. PNG remains fine for small logos and icons, and SVG is better still for logos drawn as vector shapes. The JPG vs WebP guide shows how to serve WebP with a fallback.
For print
Printers accept both. A high quality JPG (90 or more) is fine for photos. PNG is safer for artwork with text or sharp lines. What matters most is the number of pixels: about 300 pixels per inch of print size for sharp results. The DPI number stored in the file only sets the default print size, and you can set it with convert JPG to PNG with options.
How to choose: a checklist
- Does it need a transparent background? Use PNG (or WebP).
- Is it a photo going to a website, email or chat? Use JPG or WebP.
- Does it contain text, a screenshot, a chart or a logo? Use PNG.
- Will you edit it again? Keep a PNG copy.
- Does a form or service set a file size limit? Use JPG and compress it.
Converting between JPG and PNG
Use JPG to PNG when a program needs PNG, before editing, or before removing a background. For many files at once, use bulk JPG to PNG. Remember that the conversion keeps the current quality but cannot restore what JPG compression removed.
Convert your images now. Turn JPG into lossless PNG in your browser, one file or a whole batch, with nothing uploaded.
Open the JPG to PNG converter or make a JPG background transparent