How to compress an image here
The starting settings (By quality, Balanced, Same format) suit a phone photo going into an email or onto a web page.
- Add the photos: drop them on the box, press Choose images, or paste a screenshot with Ctrl+V (⌘V on a Mac). On a phone, Take photo opens the camera.
- Choose By quality to make files smaller in general, or To a size in KB when a form states a maximum such as 50 KB.
- Pick Light, Balanced, Strong or Custom (a slider from 10 to 100); or press a quick size from 20 KB to 2 MB, type a figure in Maximum file size (KB), or press Use beside a portal in the upload limits table.
- If the photo is far larger than it will be shown, set Also reduce the pixel size (long edge), for example 1600 px for a web page.
- Press Compress, select a row to see the result in the compare view, and download it, or everything with Download all (ZIP).
Copies are named with -compressed added, so photo.jpg comes back as photo-compressed.jpg and your original is left alone.
What happens to your photos: they never leave your device
The photos people shrink are rarely throwaway: a passport picture, a scanned certificate, a signature for an exam form. Many online compressors upload each file to a server and delete it later on a schedule you have to trust. Here your photos are read into this tab’s memory, encoded by WebAssembly builds of MozJPEG, Oxipng, libwebp and libavif from the Squoosh project, and handed back as downloads. They are never uploaded. If a codec cannot load, the browser’s own encoder takes over for that file and its report says so.
Checking takes about a minute:
- Open your browser’s developer tools (F12, or Cmd+Option+I on a Mac) and choose the Network tab.
- Compress a photo of 3 MB or more. An upload would show as a request about that size. You will see only the codec code loading from dothecalculation.com and the site’s consent and analytics requests, whose page-view record carries no photo.
- Then switch on airplane mode and compress another. It still works, because nothing has to be sent anywhere.
Our guide Are online PDF converters safe? explains what uploading a file to a converter involves and how to run this check on any site.
How image compression works
Lossless compression stores exactly the same pixels in fewer bytes. Lossy compression discards detail your eyes are unlikely to miss, so the file is far smaller but no longer identical. JPG is lossy, WebP and AVIF usually are, and PNG is lossless.
JPEG quality, from 1 to 100, sets how coarsely the encoder rounds off detail in each 8 × 8 block of pixels. High numbers keep hair and leaves; low ones smooth them away and eventually leave visible squares. The number is not a percentage, and it differs slightly between programs. Chroma subsampling is the second lever: eyes notice brightness more than colour, so a JPG normally stores colour at half the width and height (4:2:0). That is hard to see in faces and landscapes but smears thin coloured lines and red text. Under Advanced, Automatic lets the encoder decide, and 4:4:4 keeps full colour detail for a larger file. JPGs from MozJPEG here are also progressive: it loads as a blurred whole that sharpens, rather than line by line.
The encoder matters as much as the number. We compared MozJPEG at quality 75 with Chrome’s built-in JPEG encoder, raising the browser’s quality until both files had the same fidelity (PSNR, explained below). MozJPEG was smaller on 13 of 14 test images: phone-size photos by 48–56% (one 12-megapixel photo was 230 KB against 513 KB, both at 41.4 dB), a real 12.8-megapixel portrait by 14% (762 KB against 889 KB), and small web photos by 8–17%. The exception was a noisy greyscale document scan, where the browser’s file at quality 50 was 8.5% smaller at the same fidelity: MozJPEG is tuned for how photos look, not for keeping random speckle.
PNG shrinks two ways. Lossless (Oxipng) repacks identical pixels: a text screenshot went from 190,314 to 151,702 bytes, a transparent logo from 45,853 to 40,740, and a 16-bit PNG from 2.05 MB to 1.23 MB as it became 8-bit. A photo saved as PNG barely moved (460,161 to 439,867 bytes). Palette reduces the image to at most 256 colours, with a colour count slider and dithering for photos: the logo fell to 31,161 bytes and the photo PNG to 149,231. On the screenshot, though, Palette gave 200,806 bytes, more than Lossless, because smoothed text uses many greys. Lossless suits screenshots; Palette suits logos.
WebP compresses photos harder than JPG, supports transparency and has a lossless mode (Lossless WebP under Advanced). Our 2000-pixel portrait was 157,720 bytes as WebP 75 against 222,436 as JPG 75, at slightly higher PSNR. MDN lists Chrome, Edge, Firefox, Opera and Safari as supporting it (https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Image_types), but a form that asks for JPG still refuses it.
AVIF is newer and was smallest in every test: the portrait at AVIF 55 was 105,857 bytes, under half the JPG 75 file, at the same 36.1 dB. The same browsers show it, which makes it ideal for a website you run and a poor choice for a file someone may open in an older program.
Compressing to a size in KB: 20 KB, 50 KB, 100 KB and more
Job, exam, visa and passport portals state a limit in kilobytes, some a minimum too. Choose To a size in KB and press a quick size or type the limit; 1 KB counts as 1,024 bytes, as upload forms count it.
The search starts at the quality you set (never above 92 for JPG) and works down as far as 25, looking for the highest quality that fits. If even the lowest is too big and Allow a smaller pixel size to reach it is on, it estimates a smaller pixel size from the sizes measured so far, since file size grows roughly with pixel count, and searches again. For JPG, a last step tunes colour (chroma) quality separately to close the final few kilobytes. Each image gets at most 22 encodes and 45 seconds; if the limit cannot be met, the smallest result is kept as “Closest achievable”, with the reason (the switch is off, say, or the image would drop below 24 pixels on its short side).
The Upload limits for passports, visas, exams and jobs table has a Use button per row that fills in the limit, any stated minimum and pixel size, and JPG. Figures as published on each official page, read on 30 September 2026 (the US page on 1 October 2026):
- US visa and Diversity Visa lottery: square JPEG, 600 × 600 pixels, 240 KB or less, as published on the State Department’s photo requirements page (https://travel.state.gov/content/travel/en/us-visas/visa-information-resources/photos.html), read via the Internet Archive’s copy of 30 December 2025 because the live page blocks automated checks.
- UK passport online: at least 600 × 750 pixels, 50 KB to 10 MB, per GOV.UK’s rules for digital photos (https://www.gov.uk/photos-for-passports/rules-for-digital-photos).
- India Passport Seva: photo 630 × 810 pixels, JPEG, under 250 KB; signature under 100 KB, per the Passport Seva upload instructions PDF (https://assets.ctfassets.net/xxg4p8gt3sg6/65N7mZz0hfj57DM1VlnLA2/284bfc9bd711eda8a8564dad5019cc70/PASSPORT_SEVA_PHOTO_UPLOAD_INSTUCTIONS.pdf); we could not confirm which portal page links to it.
- IBPS CRP RRBs XV notification (https://www.ibps.in/wp-content/uploads/CRP-RRBs-XV-notification.pdf): photo 200 × 230 pixels preferred, 20–50 KB; signature 140 × 60, 10–20 KB; left thumb 240 × 240 at 200 DPI, 20–50 KB; handwritten declaration 800 × 400, 50–100 KB.
- UPSC upload instructions (https://upsconline.nic.in/caf/assets/PDF/instruction-photo-signature-upload-upsc.pdf): photo JPG 20–200 KB; three signatures stacked in one JPG, 20–100 KB, 350–500 pixels. An older UPSC FAQ said 20–300 KB for the photo.
- SSC CGL 2026 notice (https://ssc.gov.in/api/attachment/uploads/masterData/NoticeBoards/Notice_of_adv_cgl_2025.pdf): the photo is taken live; the signature is a JPEG of 10–20 KB.
- Pakistan: DGIP online passport, 350 × 467 pixels, JPEG, up to 3 MB, white background (https://www.dgip.gov.pk/eServices/online-passport.php); online visa photo up to 350 KB, per the NADRA visa photograph guide (https://visa.nadra.gov.pk/photograph-guide/); FPSC application photo, JPEG under 30 KB (https://cp.fpsc.gov.pk/gr_one/Guidelines_for_Online_Application_Submission_FPSC_updated_09-09-2025.pdf).
- Canada: online citizenship photo at least 420 × 540 pixels, up to 4 MB, per IRCC (https://www.canada.ca/en/immigration-refugees-citizenship/services/application/application-forms-guides/citizenship-application-photograph-specifications/grant-online.html); online passport photo 1200 × 1800 to 3000 × 4500 pixels, JPG, 200 KB to 5 MB (https://www.canada.ca/en/immigration-refugees-citizenship/services/canadian-passports/photos.html).
- Schengen: no EU-wide digital rule was found; one example, VFS Global’s Belgium visa centres in Iran, asks for at least 240 × 320 pixels, 3:4, up to 120 KB (https://www.vfsglobal.com/one-pager/belgium/iran/english/pdf/photo-specification.pdf). The UAE’s ICP published only print rules, and US passport online renewal figures could not be verified on the official page, so follow those portals’ own instructions.
In 76 test runs (19 images, each to 20, 50, 100 and 200 KB as JPG, downscaling allowed), all 76 results were at or under the limit. 21 already fitted at full size and top quality; of the other 55, 54 (98.2%) landed within 3 KB under the limit. The median time was 1.8 seconds per image and the slowest, a 45-megapixel photo, 17.5 seconds.
The downscale switch is on by default because some limits need it. With it off, a 12-megapixel phone photo could not go below 75 KB against a 50 KB target, a 12.8-megapixel portrait stopped at 224 KB against 20 KB, and a screenshot at 55 KB against 20 KB. Turn it off only when the portal fixes the pixel size, and set that size first.
A small fixed size can make a minimum hard to reach instead. At IBPS’s 200 × 230 pixels our portrait weighed 6.2 KB at quality 60, 11.9 KB at 85 and 19.2 KB even at 92, just under the 20 KB minimum; the tool warns when a result falls below a portal’s minimum.
Our guide to compressing a photo to a KB limit for online forms covers a whole application, from cropping to a rejected upload, and Signature Maker produces a clean signature image to bring under a portal’s limit here.
Quality versus size, measured on three photos
We saved three photos at five JPG qualities plus WebP 75 and AVIF 55, the two large ones first resized to 2000 pixels on the long edge. PSNR (peak signal-to-noise ratio) measures in decibels how closely the compressed pixels match the original: higher is closer, and figures compare only within the same photo.
- Portrait, 1600 × 2000: JPG 50, 134,759 bytes (34.13 dB); 60, 159,211 (34.73); 75, 222,436 (36.08); 85, 362,275 (38.32); 95, 914,480 (44.44); WebP 75, 157,720 (36.79); AVIF 55, 105,857 (36.09).
- Phone landscape photo, 1500 × 2000: JPG 50, 27,437 bytes (38.91 dB); 60, 31,390 (39.38); 75, 44,211 (40.54); 85, 89,101 (41.55); 95, 490,506 (46.04); WebP 75, 27,780 (40.39); AVIF 55, 14,440 (40.38).
- Astronaut test photo, 512 × 512: JPG 50, 21,582 bytes (32.06 dB); 60, 24,781 (32.85); 75, 32,583 (34.57); 85, 49,566 (37.02); 95, 100,310 (43.66); WebP 75, 25,814 (36.01); AVIF 55, 20,943 (36.52).
Going from 85 to 95 made files two to five and a half times larger, for detail best judged in the 200% compare view before you pay for it. Going from 50 to 75 added only 51–65%. WebP 75 and AVIF 55 were smaller than JPG 75 every time, at equal or better PSNR on two photos and within 0.2 dB on the third.
The presets sit on this scale: Light is JPG 85 (WebP 85, AVIF 68), Balanced JPG 75 (WebP 75, AVIF 55), Strong JPG 60 (WebP 62, AVIF 42). Before sending, compare a face or some text at 200%, which shows pixels unsmoothed. The Compression Ratio Calculator turns before and after sizes into a ratio.
Can a JPEG be compressed without losing quality? Only by dropping metadata, which the tool does losslessly when a JPG is kept as it is. Re-encoding at any quality changes pixels, and if it would not make the file smaller (same format, no resizing), the original is kept byte for byte and the report says why.
Location, date and camera details
A phone photo’s EXIF data usually records when it was taken, the phone model and, if the camera could use location, GPS coordinates of where you stood. Send the file and all of that goes with it.
Keep photo details (EXIF) is off by default, so GPS location, date and time and camera model are removed. For a JPG kept as it is, the blocks are cut out without touching the picture; any re-encoded file is written with no metadata at all. We checked: stripped files hold no EXIF, Photoshop or comment blocks, and the Pillow image library finds no GPS in them.
Switch it on only when the details help, for example for a date-sorted archive. They are carried only into JPG output, from JPG or HEIC originals; the photo is turned upright in its pixels with the orientation tag reset, size tags are updated, and the embedded thumbnail is dropped because it would still show the uncropped original. GPS travels too, so leave it off for any portal or stranger.
When to shrink the pixels instead
Halving width and height leaves a quarter of the pixels, and the file shrinks roughly in step, so for photos seen only on screens, pixel size is usually the bigger lever. Our 3200 × 4000 portrait, pushed to KB limits from quality 75, came out at 1641 × 2051 pixels for 200 KB (quality 70), 1138 × 1423 for 100 KB (64), 805 × 1006 for 50 KB (55), 355 × 443 for 20 KB and 231 × 289 for 10 KB. At 250 KB, though, the search kept every pixel and dropped to quality 29, because it tries quality before pixels, and that looks worse than a smaller photo at normal quality.
So set the pixel size first when a limit is tight: a long edge under Also reduce the pixel size, or an exact size such as 630 × 810 in Resize Image. A lower starting quality helps too, since the search never goes above it. Our guide to image size, pixels and DPI explains how pixel, print and file size relate; the Aspect Ratio Calculator finds a size that keeps the shape, and the Screen Resolution PPI Calculator shows how many pixels a screen really displays.
Which format to choose for a small file
Save as offers Same format, JPG, WebP, AVIF and PNG. Same format keeps what you gave it, except that HEIC becomes JPG and GIF, BMP and SVG become PNG.
- Forms, portals and email: JPG. The portals above that name a format ask for JPG or JPEG, and every mail program opens it.
- A website you run: WebP or AVIF, smaller than JPG 75 on every photo we measured.
- Screenshots and logos: PNG, since JPG blurs text edges. Lossless cut our screenshot by 20% with identical pixels; Palette suits flat graphics.
- Transparent backgrounds: PNG, WebP or AVIF; JPG cannot store transparency.
The best format for a small file is the smallest one the recipient accepts. Image Converter changes format without compression options and also writes GIF, BMP and ICO; our guide PDF vs JPG vs PNG compares formats for scans and printing; JPG to PDF combines photos when a portal wants one PDF; and HEIC to JPG converts hundreds of iPhone photos when you need them converted rather than squeezed.
Compressing many photos at once
Add as many photos as you like; they are processed one at a time with one setting for the batch, each row showing the size before and after. After a change, Apply to N images redoes only the files whose settings changed. Every file gets a report headed “What changed in” and its name, noting anything unusual: reduced to fit memory, original kept because re-encoding would not shrink it, a limit only approached, or the browser’s encoder standing in. Download rows singly or press Download all (ZIP) for compressed-images.zip.
The Data Storage Calculator shows how many photos at the new size fit on a phone or card, and the Internet Download Time Calculator how long the batch takes to send.
Colour, HDR and transparency
Output is sRGB, the colour space browsers and forms assume. Wide-gamut photos, such as Display P3 ones from recent phones, are converted, so very saturated reds and greens may look slightly less vivid. HDR and 10- or 16-bit photos become 8-bit standard range, so HDR highlights lose their extra glow.
Transparency survives in PNG, WebP and AVIF. JPG and BMP cannot hold it, so transparent areas take the background colour you choose under Advanced; in our checks a transparent logo saved as JPG on white came out with pure #FFFFFF corners.
Limits
No cap on files, size or megapixels beyond device memory: phones and iPads handle about 16–24 megapixels per image, computers about 50, and bigger images are reduced first, with a note. A 45-megapixel photo (8192 × 5504) became 4879 × 3278 on a 16-megapixel budget and 5976 × 4015 on 24, without crashing, and kept full size on a desktop in 6.6 seconds.
TIFF and camera RAW files are not accepted: save a TIFF as PNG or JPG in Preview, Photos or an editor, or export a JPG from the camera app, Lightroom or Photos. An animated GIF keeps only its first frame, and SVG is turned into pixels. The tool does not crop or check a passport photo’s head size, lighting or background; Resize Image handles exact crops.
Your data
Only your option choices, such as the mode, preset and Save as format, are remembered, in this browser’s local storage. Your photos, their names and sizes are not stored; closing the tab clears them from memory, and clearing this site’s data removes the saved options.
General information about image compression. Upload limits and photo rules on passport, visa, exam and job portals change, sometimes between application rounds. The figures here were read from each official page on the dates given; check the portal’s current instructions before you submit.