Image Shrink-to-Limit

Reduce one image to the byte cap you choose in this browser tab. Nothing uploaded.

ZERO UPLOAD · ALL LOCAL
  1. Choose one JPEG, PNG, WebP, HEIC, or HEIF still image by dropping it into the source area or opening the file picker.
  2. Pick 100 KB, 500 KB, 2 MB, or 5 MB, or enter a custom positive target and choose KB or MB.
  3. Choose JPEG for broad form compatibility or WebP when you need transparency.
  4. Click Shrink image and wait while the tool finds the highest quality and dimensions within the selected cap.
  5. Check the final size, dimensions, format, and quality in the result panel.
  6. Click Download image, or Reset to clear the selected file and result from the tab.

Image file

No image selected

Maximum file size
Compressed format

Before

Select an image to see the source preview.

File
-
File size
-
Dimensions
-
Format
-
Quality
-

After

Shrink the image to see the output preview.

File
-
File size
-
Dimensions
-
Format
-
Quality
-

When an upload cap blocks your image

A form can reject a photo even when the picture looks ordinary on your phone. The problem is usually a byte limit set for faster uploads, storage quotas, or a document workflow that expects every attachment to stay under a fixed threshold. Cropping a picture may help, but it also changes the composition, and sending the original to an online converter can be an uncomfortable trade when the image contains an ID, receipt, medical note, or family photo. A predictable size cap solves the immediate submission problem without asking you to guess at export settings.

In this tool, you start with one still image and name the maximum final size before any encoding begins. The source panel keeps the original filename, dimensions, preview, and byte count visible so you can compare the result with the selected input. A clear target matters. Instead of producing a file that is merely smaller, the encoder keeps testing until the finished JPEG or WebP is at or below the cap you selected, then gives you a new file ready for the destination form.

How the byte target changes quality and dimensions

A file that already fits the target stays untouched. When its byte size sits at or under the limit you chose, the tool skips encoding entirely and hands back that same file exactly as selected, in its original format, with quality, transparency, and dimensions all intact. Once the source is larger than the target, the encoder draws it at its original pixel dimensions and checks a high quality setting first; if that setting still exceeds the target, it searches lower quality values and keeps the best result that fits the budget. Quality changes detail, especially around fine texture and text, yet it leaves the displayed width and height alone.

When the encoder resizes as a last resort

For a strict cap, quality alone may not be enough. Once the encoder reaches its quality floor and the file still runs too large, it reduces both dimensions while preserving the image's aspect ratio, then searches quality again at that smaller size. This order gives the encoder a useful choice at every stage. You receive a result under the selected limit, or the tool stops when the image would become impractically small and tells you to raise the target rather than offering an over-limit download.

How the quality search converges

The tool does not guess a single quality value and hope it fits. Starting from a quality ceiling near the top of the scale and a floor near the middle, the encoder narrows that range with a series of successive midpoint tests, keeping whichever result comes closest to the target without going over it. That approach converges quickly because JPEG and WebP encoders scale file size predictably as the requested quality changes.1

You never see these intermediate attempts, only the final measurement in the result panel once the search finishes. Each test runs on an in-memory canvas, so none of it touches your original file or leaves the browser tab. Modern devices complete the whole sequence in a fraction of a second, even when a strict cap forces the encoder through both a quality search and a resize pass.

Choosing JPEG or WebP

JPEG is the practical default. Reach for it when a portal names common photo formats or you simply need the broadest compatibility, since the format stores a new flattened image that suits ordinary camera photos where every pixel is already opaque. In the output panel, JPEG starts selected because it gives many form systems a familiar extension. Your final file receives a fresh name that includes the requested byte target, making it easier to distinguish from the source when both files sit in the same download folder.

WebP gives you another route when the original uses transparent pixels. A transparent PNG may show a logo, product cutout, or annotation without a rectangular background, and JPEG has no place to keep that transparency.2 When you select JPEG for such a source, the tool calls out that transparent areas will become white. Switching to WebP removes the warning and preserves the transparent regions in the output.3 Because changing the format changes the encoded bytes, the interface clears any old result until you shrink the image again.

Why a new download is safer for form uploads

Upload sites evaluate the file you attach, not the controls you used to make it. The result panel therefore shows the exact final size alongside the original size, bytes saved, output dimensions, format, and selected quality before it reveals the download action. Before you download, that small review point catches a common mistake: selecting a target, changing it later, then assuming the old download follows the new setting. Here, a changed target, unit, or output format hides the stale result and requires another pass through the encoder.

The download is a newly encoded raster image rather than the source file with a renamed extension. That distinction matters because the byte cap applies to the bytes the destination will receive. Before you attach it, compare the exact final size with the form's wording and leave a modest margin if the site describes a rounded limit. Keep the original file until the upload succeeds. The new image is purpose-built for the submission, while the source remains the version you can revisit for another target or format.

What stays in your browser

Inside this page, your browser decodes the selected still image, draws it to an in-memory canvas, and encodes the result locally. CapyToolkit never posts the image to a conversion server. For HEIC and HEIF, the page loads a decoder only after you select that kind of file, then uses the decoded pixels in the same local image workflow. The decoder download is code needed by the browser, not an upload of the image you chose.

The page also treats the image as temporary tab state. Reset clears the source preview, decoded bitmap, result preview, and the browser object URLs that make those local previews possible. Because silently exporting one frame from a moving image would be misleading, the tool rejects animated files outright.4 If your browser cannot decode a source or runs out of canvas resources, the status message explains the problem and keeps the choice simple: select another image or use a larger target.

What the HEIC decoder actually loads

The HEIC and HEIF path relies on a WebAssembly decoder that ships as a separate module, fetched only when you select a file with that extension or MIME type.5 Once loaded, the module decodes the still image into raw pixel data, which the tool then draws onto the same in-memory canvas used for JPEG, PNG, and WebP sources. That shared path is why a decoded HEIC photo behaves identically to any other source once you reach the target and format controls.

Sources
  1. 1.

    Ilya Grigorik and Jeremy Wagner, "Choose the Correct Level of Compression," web.dev, accessed September 2026. https://web.dev/articles/compress-images

  2. 2.

    Mozilla Developer Network, "Image File Type and Format Guide," developer.mozilla.org, accessed September 2026. https://developer.mozilla.org/en-US/docs/Web/Media/Guides/Formats/Image_types

  3. 3.

    Google for Developers, "An Image Format for the Web: WebP," developers.google.com, August 2025. https://developers.google.com/speed/webp

  4. 4.

    Nokia Technologies, "HEIF Technical Information," nokiatech.github.io, accessed September 2026. https://nokiatech.github.io/heif/technical.html

  5. 5.

    "HEIF/HEIC Image Format," Can I Use, caniuse.com, accessed September 2026. https://caniuse.com/heif

FAQ