Skip to content

Compress image

Shrink JPG, PNG and WebP files to a target size.

Images are shrunk on this device and never uploaded. The site counts page views.

Compress by

Smaller fileBetter picture

Save as
px
px

Runs in current Chrome, Edge, Firefox and Safari (Safari cannot save WebP). Batches of 50 images, each up to 50 MB.

How do you compress an image?

Add it, choose a quality, a maximum size in pixels or a target in KB, and press Compress. The page draws each image onto an invisible canvas at the size you choose and asks your browser's own JPEG or WebP encoder to save it again at a lower quality. Nothing is uploaded.

The quality slider sets how much fine detail the encoder throws away. Around 70 to 80, most photos lose a large share of their bytes with no change you can see at normal size. Below about 40, edges start to ring and flat areas such as sky or skin break into visible squares.

Shrinking the pixel dimensions saves far more than quality alone. Halve the width and the height and there are a quarter as many pixels to store. A 12-megapixel phone photo is 4,032 pixels wide, far more than most forms display.

Hitting a size in KB

For a limit such as "JPG, maximum 50 KB", target mode saves the image at a range of qualities, closing in on the best one that fits in seven or eight tries. When the lowest useful quality is still too large, it reduces the dimensions in steps and searches again. For a range such as "20 KB to 50 KB", set the target to the upper number.

Some systems count 1 KB as 1,000 bytes and others as 1,024, so a 50 KB limit can mean 50,000 or 51,200 bytes. The tool aims under 1,000 times your number, which passes under either reading. Your computer may then report a 49,500-byte file as "48.3 KB" (Windows divides by 1,024), which is expected.

How much room a size limit leaves

Bits per pixel (file size in bits divided by the number of pixels) shows whether a target is realistic. An uncompressed color photo uses 24 bits for every pixel.

Bits available per pixel at common file size limits
Limit600 × 750 px1200 × 1600 px4032 × 3024 px (12 MP)
20 KB 0.36 0.08 0.013
50 KB 0.89 0.21 0.033
100 KB 1.78 0.42 0.066
200 KB 3.56 0.83 0.13

Source: calculated, with 1 KB = 1,000 bytes = 8,000 bits. 600 × 750 is the minimum for a UK digital passport photo.

A full-size phone photo cannot be squeezed to 50 KB by quality alone: each pixel would get three hundredths of a bit. A 600 × 750 crop has nearly a whole bit per pixel, plenty for a face, so set a max width before the target.

Which format should you save in?

Which format to save in
FormatCompressionUse it forThis tool saves it
JPEG Lossy Photos, and any form that says JPG Yes, every browser
PNG Lossless Screenshots, text, logos, transparency Kept as PNG; resize only
WebP Lossy or lossless Websites and apps; 25–34% smaller than JPEG Chrome, Edge, Firefox
HEIC Lossy (HEVC) iPhone camera originals No; convert first

Source: MDN Web Docs; Google WebP documentation; caniuse.com.

PNG is lossless, so a quality setting cannot shrink it; the only levers are fewer pixels or a switch to JPEG. If a PNG has a transparent background and you save it as JPEG, the transparent areas turn white, since JPEG has no transparency. WebP keeps transparency and is usually the smallest, but many government and exam portals accept only JPG. Safari cannot save WebP from a web page, so the option is off there. For iPhone photos in HEIC format, use the HEIC to JPG converter first.

Upload limits on forms

Visa, passport, exam and job portals publish their own photo rules, often a size range in KB, exact pixel dimensions and a format, and they change between application cycles. The luggage tags under your file list check the compressed files against four limits. Two are published: a UK passport photo upload must be 50 KB to 10 MB (and at least 600 × 750 pixels), and Google says a personal Gmail account can send attachments up to 25 MB. The photo limit is checked on your largest file, the Gmail limit on all files together, since they travel in one message. The 100 KB and 2 MB tags are our own round numbers for small and typical upload boxes, not a rule from any service.

Signature uploads tend to have the tightest limits. A signature is a few dark lines on white, which compresses extremely well, so crop away the empty paper first and a small target is easy to reach without blur. If the portal wants a document instead of a picture, put the photos in a PDF with the JPG to PDF converter.

Small files that still pass

  • Crop first. The crop image tool cuts to an exact size or ratio.
  • Set dimensions, then the target. If the form gives pixel sizes, enter them as max width and height; the target search then works on the right image.
  • Use even light. Noise from a dim room is fine detail the encoder must store, so a photo taken in daylight compresses smaller at the same quality.
  • Check the preview at full size. Press After and look at the eyes and text. If they are soft, raise the target or lower the dimensions.

Common questions

Does compressing remove location and camera data?

Yes. Saving through the canvas writes a fresh file with no EXIF data, so GPS location, camera model and date taken are gone.

Why did my file get bigger?

The original was already compressed harder than the setting you chose, or it was a PNG saved again as PNG. The tool spots this and keeps the original, marked "original kept".

Can it compress to exactly 20 KB?

It gets as close as it can below 20 KB, usually within a kilobyte or two.

Do the colors change?

Slightly, in some cases. Canvas output is in the standard sRGB color space, so photos from recent phones that use a wider color range can look a touch less saturated.

Sources

Last reviewed November 9, 2026.

Related tools