JPG vs PNG vs WebP: Which Image Format Should You Use?
Short answer: use JPG for photos you need to send anywhere, PNG for screenshots, logos and anything that needs a transparent background, and WebP for images on your own website, where it usually gives the smallest file. If you're not sure where an image will end up, JPG for photos and PNG for graphics will almost always be accepted.
The right choice depends on two things: what's in the picture (a photo, or sharp text and flat colors) and where it's going (an email, an upload form, your own web page). The rest of this guide explains the difference between the three formats and gives you a quick way to decide.
The one idea that explains most of it: lossy vs lossless
Image formats shrink files in one of two ways.
- Lossy compression throws away detail your eye is unlikely to notice, which makes files much smaller. Save the same image lossy again and again, and it loses a little more each time.
- Lossless compression keeps every pixel exactly as it was. Files are bigger, but nothing is lost.
Photos have smooth gradients and lots of fine noise, so lossy compression works well on them; you rarely see the difference. Screenshots, diagrams and logos have sharp edges and solid colors, and lossy compression tends to leave fuzzy patches and colored fringes around text. Mozilla's guide to image formats (MDN) puts it plainly: for screenshots, diagrams, logos and line art, prefer lossless encoding.
The three formats side by side
| JPG (JPEG) | PNG | WebP |
| Compression | Lossy | Lossless | Lossy or lossless |
| Transparent background | No | Yes | Yes |
| Animation | No | Not in standard PNG | Yes |
| Best for | Photos you'll email or upload | Screenshots, logos, graphics with text | Photos and graphics on your own website |
| Where it can cause trouble | Text and sharp edges look blurry; no transparency | Photos become large files | Some older programs and upload forms reject it |
JPG and JPEG are the same format with two spellings of the file extension.
JPG: the safe choice for photos
JPEG is the most widely used format for photos. Every phone, computer, email program and upload form accepts it, which is why it's the safe default when you don't control where an image ends up: a job application portal, a government form, an online marketplace listing.
Its limits are the flip side of being lossy. A screenshot of a spreadsheet saved as JPEG will have smudgy text, and JPEG can't store transparency at all. If you save an image with a see-through background as JPEG, those areas are filled with a solid color. In Image Compress, that fill is white.
PNG: for sharp edges and transparency
PNG is lossless and supports full transparency, and every major browser handles it. Use it for:
- Screenshots, especially of text, code or spreadsheets.
- Logos, icons and diagrams with flat colors.
- Anything with a see-through background: a logo you'll place on a colored slide, a product cut-out from Background Remover, or a round avatar from Circle Image Crop.
Where PNG goes wrong is photos. Because it keeps every pixel, a phone photo saved as PNG is often much bigger than the original JPEG, with no visible improvement. If a form says your photo is too large and it's a PNG, converting it to JPEG is often the quickest fix (as long as you don't need transparency).
WebP: smaller files for the web
WebP was designed for websites. It can be lossy or lossless, supports transparency and can be animated. According to MDN, lossy WebP files are on average 25–35% smaller than JPEG at similar visual quality, and lossless WebP files are typically about 26% smaller than the same image as PNG. Smaller images mean faster pages, which matters for a blog, a shop or a portfolio.
All modern browsers display WebP. The catch is outside the browser: some older programs and a few upload forms still reject it. MDN also notes that on a Mac, Safari needs version 14 or later on macOS Big Sur or later to show WebP. So WebP is a great choice for images you put on your own site, and a riskier one for files you send to other people or upload to someone else's system.
A common situation: you download an image from a website, it turns out to be a .webp file, and the program you want to open it in won't accept it. Converting it to JPEG (for a photo) or PNG (for a graphic) solves that.
Quick decision guide
| You have | Going to | Use |
| A phone photo | Email, job portal, government or rental form | JPG |
| A product photo | Your own online shop or website | WebP (JPG if your platform doesn't accept it) |
| A screenshot with text | A report, support ticket or tutorial | PNG |
| A logo or icon | Slides, documents, a website | PNG (or SVG if you have the vector original) |
| A cut-out or round image with a transparent background | Anywhere | PNG, or WebP on your own website |
| A photo for a blog post | Your own website | WebP, resized to the width your page shows |
SVG is a fourth option worth knowing about for logos and icons: it stores shapes rather than pixels, so it stays sharp at any size. You usually only have one if a designer gave it to you, though; you can't turn a photo into a true SVG.
How to convert between formats
Image Compress converts between JPEG, WebP and PNG in your browser, and it can make the file smaller at the same time.
- Click the upload area and pick one image. PNG, JPG and WebP files work, and so does any other image type your browser can open.
- Choose the output format: JPEG, WebP or PNG. WebP is selected when you start.
- For JPEG or WebP, set the Quality slider (10% to 100%, starting at 80%). PNG ignores the slider because it's lossless.
- If the image is wider than you need, type a number in Max width. The height scales to match. Leave it at 0 to keep the original size.
- Check the four boxes under the controls: original size, compressed size, percentage saved and final dimensions.
- Click Download. The file is saved with
-compressed added to its name.
Your image is processed by your browser's built-in encoder and never sent to our server. The tool handles one image at a time.
A few things to watch
- The Saved box turns red. The new file is bigger than the original. This usually happens when you convert a photo to PNG, or the original was already well compressed. Lower the quality or switch format.
- Start from the original. Each time you re-save a JPEG it loses a bit more detail, so keep your original and convert from that rather than from an earlier compressed copy.
- Resizing often saves more than format. A phone photo can be 4000 pixels wide while most web pages show images under 1600 pixels. A max width of 1200 to 1600 is a quick win for blog posts and shop listings.
- Converting to JPEG removes transparency. See-through areas become white. If you need them, stay with PNG or WebP.
If an upload form rejects your file, check two things first: whether it accepts the format (switch WebP to JPG if not) and whether it's under the size limit (lower the max width, then the quality, until it fits).
KhanTools — Free Online Web Tools
Free browser-based tools for images and PDFs. No uploads. 100% private.
Blog ·
About ·
Privacy Policy ·
Terms of Service ·
Contact
JavaScript is required to use KhanTools. Please enable JavaScript in your browser.