Skip to content
Morphr

Compress an image or PDF to an exact size

Pick a target (20 KB, 100 KB, 1 MB, or a custom limit) and Morphr searches for the highest quality that still fits, right in your browser. Nothing is uploaded.

Drop an image or PDF, or click to browse

Compressed on your device. Nothing is uploaded.

How it actually hits a target size

Point this at a JPEG, PNG, WebP, AVIF, BMP, TIFF or PDF, choose a target, and the tool runs a binary search instead of one fixed setting. For images it tries a quality value in the middle of a 5–95 range, checks the real output size, and narrows the range (roughly halving the gap each time) until about seven attempts find the highest quality that still lands at or under your target. If the harshest quality is still too big at full resolution, it steps the longest edge down (2048px, then 1600, 1200, 1024, 800, 640) and re-runs the quality search at each size, stopping the moment something fits. PDFs use the same binary search against the engine's PDF compressor, which re-encodes embedded images at the chosen quality: no dimension step, just quality. Either way, you get the largest, sharpest result that still clears your target, not a guess.

Which preset is for what

The six presets map to limits people actually run into. 20–50 KB covers the tightest ceilings: a web thumbnail, a profile avatar, or a portal upload cap that flatly rejects anything larger. At this size, some visible quality loss on a photo is usually the trade-off, and the search makes that call for you instead of leaving you to guess a quality number by hand. 100–200 KB suits job application portals, government and visa document uploaders, and email signature images, small enough to clear the limit and still clean at normal viewing size. 500 KB–1 MB is for marketplace listings and CMS uploads, where the cap mainly exists to stop multi-megabyte camera originals rather than force visible compression. Anything the presets don't cover, the custom field takes directly, in kilobytes.

Why JPEG and WebP shrink, and PNG mostly doesn't

JPG and WebP, along with AVIF, are lossy by design: they already discard detail the eye barely notices, and turning that dial down further is what makes small targets reachable at all. PNG, BMP and TIFF aren't. They're built to reproduce every pixel exactly, which suits a screenshot or diagram but leaves no quality dial to turn for a photograph. A JPEG source stays a JPEG by default here, and the tool genuinely recompresses it in place at a lower quality rather than just stripping metadata, with WebP offered alongside as an alternative that sometimes compresses a little further. A WebP source, though, still converts to JPG: this engine's WebP encoder is lossless-only, so re-encoding a WebP back into WebP won't shrink it (it can even come out larger), and JPG is the genuine lossy path down. PNG, BMP and TIFF sources convert to JPG or WebP for the same underlying reason, since none of them has a quality dial of their own, with TIFF limited to JPG specifically because its WebP path here is lossless too. A photo saved as a PNG will shrink dramatically once re-encoded as JPEG; a genuine flat-colour screenshot will still shrink, just by less, since there's less redundant detail for a lossy encoder to remove.

Compressing a PDF is a different problem

A PDF's size almost always comes from what's embedded inside it, not the text. A scanned document (pages that are really just photographs of paper) is dominated by those embedded images, so re-encoding them at a lower quality can shrink the file substantially. A PDF built from real text, like an exported document or a report with a couple of charts, is already close to its floor: little image data to re-encode, so compression may only shave off a small amount, and the result panel says so honestly rather than implying a quality number did more than it did. See the full PDF toolset for merging, splitting and rotating the same file.

Why this runs entirely in your browser

The files people compress to hit a small size cap are disproportionately the ones you shouldn't hand to an unfamiliar server: a passport photo page, a signed contract, a scanned pay slip, a medical form. A typical "compress to X KB" site uploads your file to run the same search-and-re-encode this page runs — the only difference is where it happens. Here, the file never leaves the tab: it's parsed, re-encoded and measured by a WebAssembly engine running in your browser. With metadata stripping on (the default), EXIF, GPS coordinates and document author fields are dropped from the result too, on top of never being sent anywhere at all.

Honest limits

Quality search stops at 5, not 0, and the smallest dimension step is 640px on the long edge, so the tool won't produce an unusable single-digit-quality mess or a postage-stamp image chasing an impossible number. If those settings still can't clear your target, it hands you the smallest result it actually produced and says so, rather than failing outright. A JPEG input keeps its own extension throughout: the tool genuinely recompresses JPEG back into JPEG rather than only stripping metadata. A WebP input, though, still compresses out as JPG, since this engine's WebP encoder ignores quality entirely; if your target needs a WebP file to stay a WebP file, that's the one thing this tool won't do. If your file is already under the target, it says so and hands back the original, optionally with metadata stripped, instead of pointlessly re-encoding it. Need pixel-dimension control instead of a byte-size target? The resize tool gives you that directly; for other file-size problems, like an email attachment limit, this guide walks through the options.