Shrink a photo to an exact file size limit
Unlike just lowering quality, this tool searches for the largest file that still fits under the limit you set.
Drag one or more images here, or click to choose
JPG, PNG, or WebP, up to 25 MB each
Result
The result appears here after processing the image.
Local processing: your file never leaves your computer.
- Does:Unlike just lowering quality, this tool searches for the largest file that still fits under the limit you set.
- Processes:Your image is processed entirely in your browser — nothing is uploaded to a server.
- Doesn't do:The result depends on the image's content. Very detailed photos may not reach very low KB targets without a visible drop in quality.
Why a photo can be "too big" even when it looks fine
A lot of systems that accept an image upload never look at what's in the photo — they only check the file size, in KB or MB. That shows up in very different places: an attachment field on an online form, a job application portal with a fixed size cap, an email provider that rejects large attachments, a website that slows down under a heavy image, an app that simply refuses the upload.
A photo straight from a modern phone almost never fits inside those limits on its own: it's normal for a shot to come out of the camera at 3, 5, or even 10 MB, because phones are tuned for quality and resolution, not file size. A typical image editor only lets you pick a quality level — 60%, 80%, "high," "medium" — and the resulting file size only shows up after you save it; if it's still over the limit, you have to redo it with a different value. This tool flips that around: you enter the target size in KB, and it adjusts the image until it lands as close as possible to that number, with no editor to open at all.
How the reduction actually works
Everything happens inside your browser, using the HTML Canvas API. For JPG and WebP, the tool repeatedly tests different quality levels using a binary search: it starts by trying a quality value in the middle of the possible range, checks whether the resulting file is under the target, and narrows the search range up or down depending on the result. Within a handful of rounds, this converges on the highest quality that still fits under the size you asked for.
When lowering quality alone isn't enough — asking for 50 KB from a 4000-by-3000-pixel photo, for example — the tool starts reducing the image's dimensions in steps too, repeating the quality search at each new dimension, until it finds a combination that fits the target or reaches a reasonable minimum size. Quality is adjusted before dimensions because, in most cases, losing a bit of fine sharpness matters less than losing resolution outright — but this keeps the final image recognizable even under a tight target.
Why the file never leaves your computer
None of this depends on sending the image to a server. Reading the file, running it through Canvas, and generating the final output all happen with the browser's own native APIs, and the result comes back as a direct download. That matters whenever the image contains something you'd rather not have circulating — a personal document, a photo of someone's face, a receipt — but it applies just as much to any image: nothing is uploaded, stored, or processed outside your own computer.
Picking the right target size
If the system, form, or portal states an exact limit, use a value a little below it as your target — say, 480 KB for a 500 KB limit — to leave margin for rounding. Without a required number, just a sense that an image is too heavy for an email or a page, a target between 100 and 300 KB usually produces something sharp on any screen.
The maximum dimension field is optional: it's useful when the system also enforces a maximum resolution in pixels, or when it's better to deliver an image that's a bit smaller but sharp, rather than keeping the original resolution under aggressive compression.
Choosing the output format
The tool accepts JPG, PNG, and WebP as input, and next to the target size there's a selector with three output formats. JPG is checked by default because it's the format most forms, upload systems, email providers, and websites accept — the safest choice so an attachment doesn't get rejected just because of its file extension. WebP usually produces a smaller file than JPG at the same visual quality, but some older systems still don't accept it, so it's worth confirming before you rely on it. PNG is lossless compression: the final image loses no quality at all, but that also means there's no quality dial to turn — the target-size field is disabled in this mode, and the only way to shrink the file is to lower the pixel dimension instead.
Not every browser can encode every format — WebP support, for instance, is newer than JPG support. When that happens, the tool tells you on screen instead of silently handing back a file in a different format: reading your image worked fine, the only issue is generating that particular output format in this browser, and picking a different option in the selector solves it.
What's actually possible
There's a physical limit to how much an image can be compressed without a noticeable drop in quality, and it depends on the photo's content — images with a lot of fine detail or text compress worse than photos with more uniform areas. If the requested target is too low for what the image actually contains, the tool still delivers the smallest file it can generate, and tells you when it couldn't get below the requested value without degrading the result too much.
Frequently asked questions
How do I get under an upload size limit on a form or website — say, 200 KB?
Leave JPG selected (the default — accepted by most systems), type 200 into the target size field, upload your image, and download the result. The tool searches for the largest size under the limit, keeping the highest quality that still fits that ceiling. This works for any system with a fixed KB limit — an online application form, a job portal, a government site.
A form only accepts attachments up to 500 KB and my scanned ID or document is bigger. What do I do?
Upload the file here, set 500 KB as the target (or a bit lower, like 480 KB, for a safety margin), and download the compressed JPG. Since processing runs entirely in your browser, a document with personal information never travels through any server.
Can I use this to resize a profile photo for social media or a resume?
Yes. Besides the target size in KB, you can set a maximum dimension (in pixels) so the photo isn't larger than it needs to be. That helps both hit the KB target and avoid an unnecessarily high resolution for how the photo will actually be used.
Why is JPG the default format, and when should I pick WebP or PNG instead?
JPG is the format most forms, upload systems, email clients, and websites accept — including application portals that often require it specifically — so it's the safest default. WebP usually produces an even smaller file at the same quality, but it's worth checking the destination system accepts it first. PNG only makes sense when you need zero quality loss (like a screenshot with text) — in that case there's no KB-size control, only the pixel dimension.
What's the difference between reducing quality and reducing dimensions?
Reducing quality keeps the original width and height and compresses the internal detail (what the tool tries first for JPG and WebP). Reducing dimensions lowers the actual pixel count of the image. The tool only starts reducing dimensions once the KB target can't be reached by adjusting quality alone. PNG has no quality step at all: dimension is the only way to shrink the file.
Does the final image lose a lot of visible quality?
For JPG and WebP, it depends on how much smaller the target is than the original file: moderate reductions tend to be barely noticeable, and it only becomes visible at very aggressive targets. PNG has no such loss, because the compression is lossless — the only thing that changes is the dimension, if you choose to reduce it.
Related tools
- Convert image formatOnly changes the file format — no cropping, resizing, or any adjustment beyond output quality.
- Remove image metadataShows you the location, date, and camera model recorded in the photo before deleting them, so you know exactly what was exposed.
- Convert images to PDFControls page order, paper size, and margins — built for pages photographed with a phone, not for PDFs that already exist.
- Convert PDF to imageEach page becomes a separate JPG, PNG, or WebP file, at whatever resolution you choose — from on-screen viewing to print quality.