UnHEIClocal image lab
Browser-local converter

Compress an Image to a Target File Size

Compress JPEG, PNG or still WebP to JPG under a file-size limit you choose. The browser searches encoder quality downward and reports the size it actually reached.

Output: image/jpegExtension: .jpgSource metadata not preserved

Bounded local intake

Add still raster images

Binary signatures and dimensions are checked before files enter the queue. Animated, multi-image, truncated, and structurally ambiguous inputs are rejected.

Accepted signatures: JPEG, PNG, WEBP · up to 30 files within one decoded-work budget · paste with Ctrl/Cmd+V

Verified destination

Output contract

image/jpeg · .jpg
Presets

Lossy JPEG. Transparency is flattened onto your selected background.

Target file size

The encoder starts at the quality above and searches downward in at most 7 attempts, stopping at quality 30% rather than destroying the picture. An attempt that already fits is not pushed lower, but every download here is a fresh JPEG encode of the decoded pixels — nothing is passed through — so a file already saved at a low quality can come out larger than it went in. The size line reports the change either way. If even the lowest attempt stays larger, the smallest verified output is kept and reported as not reaching the target — no result is discarded and no size is promised.

Bounded queue

0 files checked

No file bytes are retained yet. Add files above to run signature, dimension, and browser-decode checks.

Metadata outcome

  • Browser-decoded orientation is rendered into output pixels; manual orientation controls are not provided here.
  • EXIF, GPS, capture date, and source metadata are stripped by canvas re-encoding.
  • ICC profiles are not preserved; browser color conversion may change wide-gamut or HDR sources to SDR.
  • Alpha is flattened to the selected background.

Local boundary

Selecting a file gives this tab temporary local access to its bytes. Conversion code runs in the browser and this workflow does not send file bytes, names, content, or precise dimensions to analytics. Ordinary page requests and coarse product events still use the network. Files and object URLs remain until you remove them, clear the workbench, or close the tab.

Raster work is limited to one or two concurrent browser jobs. Some canvas work can still occupy the main thread; cancellation is cooperative and an in-flight browser decode may finish before its result is discarded.

Instructions

How this conversion works

  1. 01Select .jpg or .jpeg or .png or .webp files. The browser checks type and total work before processing.
  2. 02Review the JPG controls and start conversion. Unsupported browser decoders are reported as a retryable file error.
  3. 03Download output only after its MIME, signature and extension contract passes.

Limitations

Read before processing

  • Files are processed in browser memory. Site assets and coarse analytics still use ordinary network requests; file bytes and names are excluded from events.
  • Canvas-based output does not preserve source EXIF, GPS, capture date or embedded ICC profiles.
  • A download is exposed only when the result reports JPG bytes that agree with its MIME and extension.
  • A target file size is reached by searching lossy encoder quality downward in at most seven attempts, stopping at quality 30%. It is a bounded attempt, not a guarantee, and a target the encoder cannot reach is reported as unmet rather than approximated.
  • Dimensions are unchanged unless you set a maximum width or height. On a large photo the pixel count, not the quality setting, is what puts a small target out of reach.

Why people compress images

Compression is usually forced by a limit somewhere: an email attachment cap, a web form that rejects anything over a few megabytes, a job application portal, or a page that loads too slowly because its images are too heavy. That means the real request is almost never "quality 62" — it is "get this under two megabytes". So this route takes the limit directly: pick a target size and the browser searches encoder quality downward, in at most seven bounded attempts, for the highest quality that fits. It reports the size and quality it reached, and says so plainly when the target was out of reach, because how far an image compresses is a property of the picture and no tool can promise it in advance.

How to convert JPEG, PNG or static WebP to JPG

1. Add JPEG, PNG or static WebP files for bounded signature and decoder checks.

2. Review JPG controls and the decoded-work estimate.

3. Start the cancellable queue.

4. Download files only after output validation passes.

Capability boundary

A target size is a bounded search of at most seven lossy encodes, not a guarantee. When the smallest attempt is still larger than the target, that output is kept and reported as not reaching it.

Questions

Frequently asked questions

Can I compress an image to a specific file size?

Yes, within an honest limit. Choose a target such as under 500 KB, or type one in KB, and the encoder searches quality downward to find the highest setting that fits. The first attempt uses the quality set on the page, so a file that already fits is not pushed below it — but it is still re-encoded. Every download here is a fresh JPEG made from the decoded pixels; nothing is passed through untouched, so a photo already saved at a low quality can come out larger than it went in, and the result line reports that. The search stops at quality 30%, because past that the picture is destroyed rather than compressed. If even that attempt stays above the target, the smallest verified output is kept and the result says the target was not reached — it is never quietly rounded up to a pass.

What should I do when the target is out of reach?

Reduce the dimensions. Quality alone runs out of room on a large photo, because the pixel count sets a floor on how small a JPEG can get before it looks broken. Setting a maximum width of 1600 or 1920 will usually reach a small target with far less visible damage than pushing quality into the twenties.

Does compressing an image reduce its dimensions?

Not unless you ask it to. Compression re-encodes the same pixel grid more aggressively and leaves the width and height alone. The maximum width and height controls are there for when the two together are what you actually need, which is common for photographs straight off a phone.

How is JPG output checked?

The browser encoder must return the expected MIME and binary signature. The result is decoded again and its dimensions are checked before download.

What happens to source metadata?

Canvas re-encoding strips EXIF, GPS and capture date. ICC profiles are not preserved, and HDR or wide-gamut input may be converted to SDR.

Next workflows