Real results
Smaller files you can't tell apart
Left half: the original. Right half: what you download.
BeforeAfter
BeforeAfter
BeforeAfter
Three steps
From too big to just right
Choose a photo
Tap the button, drop a file or paste a screenshot. JPG, PNG, WebP, GIF and iPhone HEIC all work.
See it get lighter
A smaller copy appears straight away. Drag the slider to compare, or type a limit like 50 KB.
Download
Save the new file. Same width and height as before unless you choose to change them.
All tools
What do you need it for?
Pick a job — each one opens with the right settings already chosen.
Compress pictureMake any photo lighter in one go, same width and height.
Compress image to KBType the limit your form gives — 20 KB, 50 KB, 1 MB.
Photo size in KB for formsPick your exam or form and get a photo that passes.
Resize signature in KBA clean, straight signature that fits the upload box.
Photo resizer in KBSet width, height and KB limit together.
Check image size in KBSee the exact KB, pixels and DPI before you upload.
Reduce image resolutionScale a huge photo down to a sensible size.
Remove metadata from photoStrip location and camera details, keep the picture.
Compress document photoCertificates and ID photos, clean and readable.
JPG to PDF under a sizeSeveral photos into one PDF under your size limit.
Increase image size in KBToo small for the form? Raise it over the minimum.
HEIC to JPG compressiPhone photos to small JPGs that open anywhere.
Compress GIFLighter GIFs that still animate the same.
Lossless image compressionSmaller file, not one pixel changed.
Image optimizer for websitesEvery size your website needs, ready to paste.
Compress photos for emailFit a whole set of photos under one mail limit.
SVG compressSmaller logos and icons, checked pixel by pixel.
Compress JPEGLighter JPGs that still look sharp.
Compress PNGShrink screenshots and graphics.
Compress WebPFast-loading WebP for websites.
Batch compressUp to 100 photos at once, one ZIP.
Photo and signature sizesSize rules for Indian exams and forms.
Questions
Asked often
Does compressing an image lose quality?
Why is my photo still five megabytes after compressing it?
Will the width and height of my picture change?
Can I hit exactly twenty kilobytes?
Is the file sent anywhere?
Why did my PNG come back larger than it went in?
The details
Fewer bytes, the same pixel dimensions. Set a quality, type a cap in kilobytes, or take a percentage off — then read what it cost at 400%.
What compression takes away
A JPEG is stored as blocks of eight pixels by eight, each turned into a set of frequency coefficients, each coefficient divided by a number from a quantisation table and rounded. The quality setting chooses that table. Rounding is where the bytes go, and what it rounds away is the fine end of the picture: the edge of small text, single-pixel highlights, film grain, the texture of skin. None of it comes back on the way out.
A PNG works the other way round. Nothing is discarded unless you ask for it: the lossless pass encodes the picture under more than one row filter, keeps whichever attempt came out shortest, and hands back pixels that are bit-for-bit the pixels that went in. Ask for a palette instead and every pixel is remapped to the nearest of the colours you allowed, which is why a screenshot survives it and a sunset does not.
Neither mechanism changes how big the picture is. A 4032 by 3024 photograph that leaves here at 180 KB is still 4032 by 3024 — though read that figure for what it is: twelve million pixels carrying about one byte for every sixty-six of them, which is a hard squeeze and a visible one, not a free result you should expect on every file. Dimensions surviving is the whole promise of this page, and it is the reason the one operation that would change them — reducing the long edge when a cap is out of reach — is a question rather than a step.
By default, this tool keeps none of your metadata.
The re-encode rebuilds the file from pixels, so EXIF, GPS, the maker notes, the embedded thumbnail, IPTC, XMP and the ICC profile all go unless you ask for something back. The Metadata panel lists each block and what it weighed, and lets you carry chosen blocks into the new file: a JPEG's date, artist and copyright (rebuilt in a fresh EXIF block), the colour profile (JPEG and PNG), and a JPEG's XMP, IPTC and comments. Their bytes come off the cap first. GPS is never carried after a re-encode, and neither is the thumbnail, which would show the old picture.
The encoders are WebAssembly builds of the desktop ones — fetched only when needed.
JPEG goes through MozJPEG, WebP through libwebp, AVIF through libavif and PNG through OxiPNG, inside a background worker on this device. Each is a file from this site, fetched the first time an encode needs it (MozJPEG is 283 KB; libavif 3.4 MB). If one cannot load, the browser's own writer runs instead and the result line says so. How many bytes MozJPEG saves over a browser's writer depends on the picture; this site has not measured a figure, so none is quoted.
The pass, step by step
- 1The file is read from disk by this page. Its first megabyte is walked segment by segment for metadata blocks, and each block's length is added up — that is where the itemised figures in the ledger come from.
- 2Orientation is resolved once. The browser is tested with a two-pixel JPEG that carries a rotation flag, and the rotation is applied by hand only if the browser did not already apply it, so a phone photograph never comes out sideways or twice-rotated.
- 3You choose the mechanism: a quality, a byte cap, or a percentage off. The picture is encoded at quality 80 the moment it opens, and again every time a setting comes to rest, so the size on the ruler is always a measured one.
- 4The encode runs in a worker. For a byte cap, the first trial is the format's floor — if even that overshoots, you know after one encode instead of eight — and the remaining trials climb back up looking for the best setting that still fits. Every trial is printed with its size as it lands.
- 5The result is decoded again for the comparison. What you split, set side by side or magnify to 400 percent is the file itself, not a preview of it, so the bytes you approve are the bytes you save.
- 6The result downloads as one file. If the re-encode came back larger than what you opened, the tool says so and tells you to keep your original rather than offering you a worse file.
Formats, and where each one stops
A JPEG leaves as a JPEG and a PNG leaves as a PNG unless you choose otherwise in the Format panel. The extension never changes on its own for either of them.
- JPG and PNG are read and written on this page, and the two routes below go into each of them properly.
- JPEG, PNG, WebP and AVIF are written as well as read — WebP and AVIF by libwebp and libavif in a background worker. GIF, BMP, HEIC and — where this browser can decode it — TIFF are read but not written: a file in one of those leaves as PNG if it has transparency to keep and as JPG if it does not, unless you pick another format. An efficient WebP re-encoded as JPG can easily come back larger; that is reported rather than hidden.
- Animated GIF and animated WebP lose their animation on this page — the first frame is what gets decoded. For an animated GIF, use the GIF page, which keeps every frame.
- A CMYK JPEG is converted to sRGB by the browser's own decoder before this tool sees a pixel, and a 16-bit PNG drops to 8 bits per channel on the way through.
- Intake stops at 120 MB, and at one file: this page is an instrument, and opening a second picture asks whether to replace the first rather than starting a queue behind your back. Above roughly 32 megapixels — 16 on iOS — you are offered a lighter working copy as a question, because past that a canvas fails by handing back a blank image rather than by reporting an error.
When the format is doing the work
A file is sometimes large because it is in the wrong container rather than because it was written generously. A photograph saved as a PNG carries every pixel exactly, artefacts included, and commonly weighs eight times what the same picture weighs as a JPEG at a quality nobody could fault. A screenshot of black text saved as a JPEG is the same mistake pointing the other way: the letters get soft edges and the file is bigger than a palette PNG of it would have been.
Changing the container is a different job from making the container smaller, and this page does not do it behind your back — a PNG that arrives here leaves as a PNG unless you choose otherwise. The Format panel measures the alternatives on a small sample of your picture and may suggest one, with the figures; it switches only when you say so. Where the change of format is the job, choose it yourself in the Format panel once a picture is open, or start from the WebP route, which writes WebP from the first encode and prints the measured bytes beside each setting.
The three mechanisms, one page each
- Compress to a size in KBThe byte cap as the whole interface, with the caps that recruitment and university forms keep asking for.
- Compress a JPEGWhat the quality number selects, and where the floor of an already-compressed JPEG is.
- Compress a PNGThe lossless pass and the palette pass, kept apart, because only one of them is lossless.
Two things worth reading when a file will not move
Some photographs barely shrink and the control above will not explain why on its own. Two pieces of writing cover the cases where that happens, both short, both about files rather than about theory. The index of the guides says which is which and how long each takes.
- Why this JPEG will not get smallerQuantisation floors, what a second re-encode costs, and when the honest answer is to leave the file alone.
- Upload limits on Indian exam portalsWhat the photograph, signature and document fields measure, and the order to do the work in when a form caps both dimensions and bytes.
One file, start to finish
A 261 KB photograph, a 50 KB cap, and the eight encodes in between
The picture at the head of this page is 1800 × 720 and weighs 261 KB. Given a 50 KB cap, the search starts at the format's floor — if even quality 5 overshoots you know that after one encode rather than after eight — and then climbs, keeping the largest file that still fits.
The target search
| # | Setting | Bytes | Cap |
|---|---|---|---|
| 1 | quality 5 | 30.2 KB | under |
| 2 | quality 53 | 96.7 KB | over |
| 3 | quality 29 | 68.7 KB | over |
| 4 | quality 17 | 51.9 KB | over |
| 5 | quality 11 | 41.7 KB | under |
| 6 | quality 14 | 46.9 KB | under |
| 7 | quality 15 | 48.6 KB | under |
| 8 | quality 16 | 50.1 KB | over |
| Kept — quality 15 | 48.6 KB | −81% |
Quality 16 is 50.1 KB and a 50 KB field rejects it, so quality 15 is the answer and the tool keeps it. Byte figures here come from a recorded run of this exact ladder; your browser writes its own JPEG and will land within a kilobyte or so of each row.
The receipt
Re-encoding rebuilds the file from pixels, so everything in it that was not a pixel is gone: the capture date, the GPS fix, the maker notes, the embedded preview, the colour profile. Open a file above and the tool itemises those blocks and what each one weighed before you press anything, with a total at the foot — the saving is never presented as a single number you have to take on trust.
The ICC row carries the one warning that matters. A profile is not decoration: dropping the Display P3 profile off a photograph does not preserve the colours it described, and a picture that looked right on the phone that took it can come back flat.
What gets stripped, and what it costs goes through the blocks one at a time.
