Home/Image Tools/Image Tools
Image Tools

Compress Image to Exact File Size

Set a maximum file size and let MicroIntent find the highest practical visual quality that genuinely fits, using measured browser output rather than a guessed compression percentage.

Local processing. No uploads. Measured output.

Target readiness

Waiting for image

Choose a local image and maximum size to begin.

Before and after

Original and optimised local previews will appear here.

How exact-size image optimisation works

MicroIntent decodes the selected image only in this browser, tests bounded output settings, and measures each resulting Blob. It selects the highest practical visual quality at or below your maximum. It does not use a fixed compression percentage or a size estimate alone.

Why results are below the target

The chosen size is a maximum, not a request to manufacture padding. A result of 98.7 KB against a 100 KB maximum is correctly reported as achieved because it genuinely fits without adding useless data.

PNG, JPEG, WebP and transparency

PNG browser encoding has no useful quality dial, so very small PNG targets can need reduced dimensions or an explicit format conversion. JPEG and WebP use a bounded quality search. JPEG cannot retain transparency and always requires a background selection for transparent input.

Review before submitting

A small file can still be visually unsuitable. Inspect the downloaded image at its intended display size, verify its dimensions and format, and retain your original. Government, passport, visa, employment and other portals may apply additional requirements that this tool cannot certify.

Privacy and metadata

Images, filenames, previews, settings, hashes and evidence remain in memory in your browser. Fresh browser re-encoding normally removes source metadata when that option is selected, but this is not a forensic certification.

KB and MB

This tool uses binary file units: 1 KB is 1,024 bytes and 1 MB is 1,024 KB. The dashboard always shows the actual measured output size alongside your selected maximum.

Frequently asked questions

How does exact-size image optimisation work?

The tool tests actual browser-encoded output files at bounded quality settings and dimensions, then selects the clearest practical measured output at or below your chosen maximum.

Why is the result below rather than exactly equal to the target?

The target is a maximum, not a request to add meaningless padding. MicroIntent reports the measured file size and selects a valid output below or equal to the limit.

Why can PNG be harder to reduce than JPEG?

PNG is usually lossless and browser canvas encoders do not expose a meaningful PNG quality setting. A very small target can require dimension reduction or an explicit conversion to JPEG or WebP.

Does the tool upload images?

No. Decoding, encoding, hashing, previews and reports run locally in your browser. MicroIntent does not upload or store the image.

Will dimensions change?

Not unless you set maximum dimensions or explicitly allow dimension fallback. The dashboard records the original and final dimensions for every result.

What happens to transparency?

PNG and WebP can retain transparency. JPEG cannot, so the tool requires a visible background choice before it flattens transparent pixels.

Can quality remain completely unchanged?

Not when lossy re-encoding is required. The tool seeks the highest practical visual quality under the selected constraints, but visual review remains necessary.

Can this guarantee a portal will accept my image?

No. Portals can enforce additional rules such as dimensions, format, photo content, metadata, or their own validation. Review its requirements before submitting.

Related private file tools

For metadata inspection and broader image conversion controls, use the related local tool before sharing a file.

Open Private Image Optimizer