Image Tools
Compress Image to Size
Compress and resize JPG, PNG, WebP, BMP, GIF, or AVIF to a target file size. Hit 100 KB, 200 KB, 1 MB, 2 MB automatically in your browser.
Target file size
Target now: 200 KB. Output is binary above zero and at or below this size when possible.
Output format
Best for photos. Lossy. Smallest size at any target.
Resize strategy
Lower the quality first, then resize only if needed.
Output
Pick a target size, then drop one or more images above. Each file is recompressed and resized in your browser until it fits at or below the target.
How to use
- Pick a target file size: 50, 100, 200, or 500 KB, 1, 2, or 5 MB, or use Custom and type your own KB or MB value.
- Choose an output format. JPEG works best for photos, WebP is about a third smaller than JPEG at the same quality, and PNG stays lossless.
- Pick a resize strategy. Auto shrink lets the tool resize only if quality alone cannot hit the target; the other chips force a fixed maximum longer side.
- Drop one or many images onto the upload area or click to pick them. The browser decodes, optimizes, and re-encodes each file locally.
- Read the per-image badges for input and output size, percent saved, dimensions, final quality, and a Fits or Did not fit pill against the target, then click Download or Download all.
About this tool
Compress Image to Size resizes and re-encodes an image so the output file lands at or below a target byte budget such as 100 KB, 200 KB, 500 KB, 1 MB, 2 MB, or any custom KB or MB value. It is the right tool when you are uploading a passport or visa photo to a government portal, attaching a profile picture to a job application form with a strict size cap, listing a product on a marketplace with a per-image limit, sending a document scan over a chat app, or replacing the existing quality-slider compressor's trial-and-error workflow with one explicit number: the size you actually need. The tool decodes the input with the browser's native image pipeline (PNG, JPG, WebP, BMP, GIF first frame, and AVIF where the browser supports it), then runs a two-stage optimizer for each picture. Stage one binary-searches the JPEG or WebP quality between 20 and 95 percent at the current dimensions to find the largest blob that fits the byte budget, so you get the best fidelity available inside the limit rather than the smallest possible file. Stage two only kicks in if even minimum quality blows the target: the longer side is scaled down by 15 percent and the quality search runs again, looping until the file fits or the longer side hits the 64-pixel floor. PNG output is lossless and ignores quality, so for PNG the tool resizes only, halving the longer side each pass until the encoded blob is under the budget. A Resize strategy chip lets you keep the original size (quality only), let the tool auto-shrink as needed, or pre-cap the longer side at 1920, 1280, 800, or 400 pixels before optimizing, which is handy when you know the upload form will reject anything above a certain resolution. Per-image results show the original file and the new file side by side: input size and output size, percent saved, original dimensions and final dimensions, final quality percent (or lossless for PNG), the number of resize passes used, and a green Fits / amber Did not fit pill against the chosen target. A small warning explains the exception when even the most aggressive settings cannot reach the target. Compression runs entirely in your browser using FileReader, an Image element, an HTMLCanvasElement, and canvas.toBlob, the same pipeline the existing image compressor uses, so passport photos, visa pictures, profile pictures, contract scans, medical IDs, and any other private image stay on your device. Useful for IRCC, USCIS, OPM, Schengen, GOV.UK, IRS, and other government forms; LinkedIn, Indeed, Workday, Greenhouse, and Lever job portals; eBay, Etsy, Facebook Marketplace, and Mercari listings; school and university admissions and scholarship portals; and any web form that hard-rejects an upload because the file is one or two hundred kilobytes over the limit.
Free to use. Works in your browser. No signup, no login.
Related tools
You may also like
Image Compressor
Compress JPG, PNG, and WebP locally with quality and resize controls.
Open tool
ImageImage Resizer
Resize images by exact pixels, percent, or fit-to dimensions with locked aspect ratio.
Open tool
ImageImage Format Converter
Convert PNG, JPG, and WebP locally with quality and transparency controls.
Open tool
ImageImage Cropper
Drag a crop box, lock common aspect ratios, rotate, flip, and download.
Open tool
ImageImage to Base64
Encode images as Base64 data URIs with CSS and HTML snippets.
Open tool
ImageImage Metadata Remover
Strip EXIF, GPS, XMP, IPTC, and color profiles from JPG, PNG, and WebP losslessly.
Open tool