Skip to content
Mb2KbSizer

File formats

JPEG vs PNG vs WebP: Which Image Format Should You Use?

JPEG, PNG and WebP compared: compression type, transparency, typical file sizes and browser support, plus a checklist for photos, logos and portal uploads.

By Naveed Published 8 min read

Pick the wrong format and one of two things happens: a photo saved as PNG balloons to several megabytes, or a logo saved as JPG grows a fuzzy halo around every letter. The format decides how pixels are stored, so it sets the floor for how small a file can get before the picture suffers. Below, we take JPEG, PNG and WebP in turn, compare them in a table and finish with a five-question checklist. For the theory behind all three, read how image compression works first.

Quick answer: JPEG for photographs and for anything you upload to an official form; PNG for logos, screenshots and images that need transparency; WebP for pictures on your own website, where Google’s tests show it about 25 to 34% smaller than a JPEG that looks the same. When a portal names a format, use that format and nothing else.

JPEG: Best for Photographs

JPEG is old by internet standards: its specification, ITU-T T.81, dates from 1992. It still carries more pictures than any other format, though; the 2024 Web Almanac found 32.4% of images requested by mobile pages were JPEGs, ahead of PNG at 28.4%.

It has lasted because it is lossy in a way that matches human eyesight. The encoder cuts the picture into 8 × 8 pixel blocks, converts each block into frequency values and divides those by a quantisation table, so fine detail is rounded away first, which is exactly the detail your eye notices least in a sunset or a face. Colour is also stored at a quarter of the resolution of brightness by default, because we see brightness far more sharply than hue.

The quality slider, 0 to 100, scales that quantisation table. The libjpeg-turbo documentation calls 50 to 95 the useful range for photographs and sets the default at 75; above about 95 the file grows quickly for differences almost nobody can see. As a yardstick, the Web Almanac measured a median of 2.0 bits per pixel for JPEGs on mobile pages, against 24 bits for an uncompressed RGB image, a reduction of roughly 12:1. For a 1200 × 900 px photo that works out to about 270 kB at typical web quality, down from 3.24 MB raw.

When JPEG Works Well

  • Photographs of people, places, food and products, where every pixel is a slightly different shade
  • Passport, ID and signature photos for application forms, which almost always ask for JPG
  • Scanned documents that contain photographs or colour artwork
  • Any upload with a hard size cap, since the quality slider gives fine control over the byte count

JPEG Limitations

JPEG has no alpha channel, so it cannot store transparency. A logo with a see-through background becomes a logo on a solid rectangle the moment you save it as JPG.

The block-based maths also struggles with hard edges. Text, line art, flat colour fills and screenshots pick up visible ringing around sharp transitions, and the file is often larger than a PNG of the same graphic.

Every save re-runs the lossy step, so crop, save, adjust, save again and the damage compounds. Keep a lossless master (PNG, TIFF or the camera’s original) and export a JPG from it last; our guide to reducing image size without losing quality covers that workflow.

PNG: Best for Graphics and Screenshots

PNG takes the opposite approach: nothing is thrown away. Before compression, each row of pixels passes through one of five reversible filters (None, Sub, Up, Average or Paeth) that predict each byte from its neighbours and store only the difference. The result is squeezed with DEFLATE, the same algorithm behind ZIP files. Decoding returns every original pixel, which is why you can open, edit and re-save a PNG a hundred times without degradation. The current specification is the W3C’s PNG Third Edition, published in June 2025.

PNG also has a full 8-bit alpha channel, so a pixel can be fully opaque, fully clear or anywhere in between; that partial transparency lets a logo with a soft shadow sit cleanly on any background colour. Simple graphics with few colours can use an indexed palette of up to 256 entries, which keeps icons tiny.

When PNG Works Well

  • Logos and brand marks, especially on transparent backgrounds
  • Screenshots of text, spreadsheets, code or app interfaces
  • Icons, buttons, diagrams and other flat-colour interface graphics
  • Overlays, watermarks and stickers that must keep a see-through area
  • Working files that will be edited and saved repeatedly before the final export

PNG Limitations

Losslessness is expensive for photographs. The same Almanac measurement that put JPEG at 2.0 bits per pixel put PNG at 3.8, nearly double, and on a real photo the gap is often wider because sensor noise compresses badly without loss. Our 1200 × 900 px example lands around 510 kB as a PNG versus roughly 270 kB as a JPEG, with no visible benefit. Unless transparency or repeated editing matters, anything that came out of a camera should be a JPEG.

WebP: The Modern Alternative

Google announced WebP on the Chromium blog on 30 September 2010, and the format is now documented as RFC 9649 (November 2024). It wraps two codecs in one RIFF container: a lossy mode that encodes the image like a single VP8 video key frame, and a lossless mode (VP8L) built on predictive transforms. Both support an alpha channel, and the container can also hold animation.

The numbers Google publishes are the reason people switch. In its own tests, lossy WebP came out 25 to 34% smaller than JPEG at the same SSIM score, lossless WebP was 26% smaller than PNG, and lossy WebP with transparency was often about three times smaller than an equivalent PNG. Real-world data agrees: the Almanac’s median WebP weighed 1.3 bits per pixel, below JPEG’s 2.0. A 300 kB JPEG should come out somewhere between 200 and 225 kB as WebP; a 600 kB transparent PNG might become about 200 kB as lossy WebP with alpha.

Browser support is no longer an objection. According to caniuse.com (October 2026 data), WebP works in about 97% of browsers in use worldwide, including Chrome 32+, Edge 18+, Firefox 65+ and Safari 14+ (on macOS, Big Sur or later). For images you serve on your own site it is a safe default; the best image formats for web performance article goes deeper, including where AVIF fits in.

When WebP Works Well

  • Hero images, product photos and blog illustrations on a site you control
  • Replacing JPEGs at similar quality but with a smaller download
  • Replacing transparent PNGs, where the lossy-with-alpha mode gives the biggest savings of all
  • Apps, dashboards and modern CMS platforms that already handle WebP natively

WebP Limitations

Support in browsers is not the same as acceptance everywhere else. Government recruitment portals, exam application forms and many HR systems whitelist file extensions, and that list is usually JPG, sometimes JPG and PNG, almost never WebP. Older email clients, some desktop photo viewers and a few editing programs also fail to open it. If a form says JPG, give it JPG; if the recipient’s software is unknown, JPEG still opens everywhere. The 2024 Almanac counted WebP at 12% of images on mobile pages: common, but far from universal.

Comparison Table

Format Compression Type Transparency Median weight (mobile web, 2024) Best For
JPEG Lossy No 2.0 bits per pixel Photos, scans, passport and ID uploads, any form that names JPG
PNG Lossless Yes, 8-bit alpha 3.8 bits per pixel Logos, screenshots, icons, text graphics, editable masters
WebP Lossy or lossless Yes, in both modes 1.3 bits per pixel Website images, transparent graphics on the web, modern apps

Which Format Should You Use?

Run through these five questions in order and stop at the first yes.

  • Is it a photo or a scan? JPEG. Set a target size and let the quality settle where it needs to.
  • Does part of the image need to be transparent? PNG, or WebP if it will only ever appear on your own website.
  • Is it a logo, chart, screenshot or anything with text and crisp edges? PNG. JPEG will smear the edges and probably cost more bytes.
  • Is it going on a web page where loading speed matters? WebP, with a JPEG or PNG fallback only if you must support very old browsers.
  • Is it being uploaded to an official portal or a job application? Whatever the instructions say, which is nearly always JPG. Our guide to compressing images for government forms lists the usual limits.

How Mb2KbSizer Handles Each Format

Our image compressor accepts JPG, PNG, WebP, GIF (first frame), BMP and AVIF files up to 60 MB, plus HEIC photos in browsers that can decode them. Type a target such as 100 kB and pick an output format: Auto gives JPG for most files and keeps a WebP input as WebP, or you can force JPG, WebP or PNG.

For JPG and WebP output the tool runs a binary search over the quality setting until the file lands at or just under your target. If hitting the number would need a quality below roughly 45%, it reduces the pixel dimensions in high-quality steps and searches again, because a slightly smaller, clean photo beats a full-size blocky one. A 3.2 MB phone photo at 4000 × 3000 px typically becomes a 96 kB JPG at about 1200 × 900 px.

PNG output behaves differently because PNG is lossless: with no quality slider to turn, the only way to make it smaller is to reduce its dimensions. Choose PNG when you need transparency or crisp text and expect the width and height to shrink to meet the target. Choose JPG for everything else, remembering that transparent areas are filled with white, since JPG cannot store them.

Whatever the format, the work runs inside your browser in a background worker. Nothing is uploaded, the picture is re-encoded from its pixels, and the original’s EXIF and GPS metadata is dropped as a side effect. If the input is already under the target, the tool says so and returns the original untouched. For a form that wants a JPG under a set limit, start at the compress an image to 100 kB page, which pre-fills the target; for a folder of product photos to convert to WebP, use the bulk image compressor.

  • #JPEG
  • #PNG
  • #WebP
  • #image formats
  • #format comparison

Naveed

I build and test the compressor on this site and write practical guides around the file-size problems it solves. Portal limits are checked against official notifications and dated when I review them. About us

Good to know

Frequently Asked Questions

Is WebP better than JPEG for photos?

On a website, usually yes. Google's own tests put lossy WebP 25 to 34% smaller than JPEG at the same SSIM score, and caniuse.com (October 2026) shows it working in about 97% of browsers in use. For an upload to a form, a job portal or a recipient whose software you do not know, JPEG is the safer choice because everything opens it.

Can I upload a WebP file to a government or exam portal?

Usually not. Most official portals whitelist JPG, and sometimes PNG, by file extension and reject anything else without explanation. Convert the picture to JPG at the required size first. Our compressor can output JPG from a WebP, PNG, BMP or HEIC original, so the conversion and the size reduction happen in one step.

Does converting a PNG to JPEG lose quality?

A little, because JPEG is lossy. On a photograph the loss is invisible at normal quality settings and the file becomes far smaller. On a logo, screenshot or text graphic it shows up as fuzzy edges, so keep those as PNG. Any transparent area also becomes solid (white in our tool) when saved as JPEG, since the format cannot store transparency.

Which of the three gives the smallest file?

For the same picture at similar visual quality, WebP is normally smallest, JPEG next and PNG largest. The 2024 Web Almanac measured median weights of 1.3, 2.0 and 3.8 bits per pixel for the three formats on mobile pages. PNG wins only for simple graphics with few colours, where its palette mode is very compact.

How do I compress an image using Mb2KbSizer?

Three steps, usually under a minute.

  1. Add your photo. Drag it onto the upload box, tap browse to pick it from your gallery, or paste it from the clipboard with Ctrl/Cmd + V.
  2. Set the target. Type a number and choose kB or MB, or tap a quick chip from 20 to 350 kB. On a preset page the field is already filled in. If a form demands exact pixel dimensions, set them in the resize option.
  3. Press Compress, then Download. You get a before/after slider, the output dimensions, the quality used and the exact byte count, so you know it will pass before you submit it.

Is it safe to upload my images to Mb2KbSizer?

Strictly speaking, you never upload anything. When you choose a file, the browser reads it from your device and does the resizing and re-encoding in a background worker on that same device. No copy travels to our server or to anyone else's; the only thing our server sends you is the page. A useful side effect is that the browser rebuilds the image from its pixels alone, so EXIF data such as the camera model, the date taken and the GPS location is dropped from the output. That makes the compressed photo safer to share than the original you started with.

What is Mb2KbSizer and what does it do?

Mb2KbSizer is a free image and PDF compressor that runs inside your web browser. You pick a file, type the size you need, such as 100 kB, and it shrinks the file to land at or just under that number. Most people use it for upload forms that reject big files: exam registrations, passport and visa applications, job portals, bank KYC and college admissions. It is just as handy for lightening photos before you email them or put them on a website. There is a [single-image tool](/), a bulk compressor for up to 200 photos at once, and a PDF compressor, all built on the same no-upload principle.

Ready to Compress Your Images?

Open the compressor, set your target size, and download in seconds — nothing is uploaded.

Compress an image to 100 kB