How to compress an image to a custom file size

Choose a size target in TinyToolbox, compare the compressed JPEG with the source, and verify the image before uploading or sending it.

Open the tool

A large photo can slow down an upload, but a file that is too compressed can be just as impractical. The recipient might need to read a serial number, follow the labels on a diagram, or see a detail that disappears in a small preview. Start with the destination’s actual limit and inspect the downloaded result at the size where it will be used.

TinyToolbox Image Compressor accepts JPG, PNG, and WebP and tries to create a JPEG at or below a custom size target. It can reduce JPEG quality and image dimensions to get there. Check the reported file size, then verify the dimensions and visible detail separately. Those three checks answer different parts of the upload requirement.

Choose a size based on the destination

Find out whether the receiver specifies a maximum size per file or a combined maximum for several attachments. If the site gives an exact number of bytes, keep that number for the final check. The tool uses decimal kilobytes, so a target of 100 KB corresponds to 100,000 bytes. Other interfaces can display an approximate or differently scaled value. Near the limit, check the exact size in the file’s properties.

If the destination says a file must be smaller than a certain number, leave some room under the cap. For example, you could try 95 KB for an upload that requires strictly less than 100 KB. If the site allows equality, a target at the limit may be sufficient, provided its definition of the unit matches. There is little reason to ask for a drastically smaller file if the receiver has room and needs fine detail.

A byte target is independent of a pixel requirement. A portal can require a photo below 100 KB that also has a minimum width. Check both requirements at the beginning. The compressor has no minimum-dimension control, so the final file must be checked for that separately.

Run Image Compressor in TinyToolbox

  1. Open Image Compressor.
  2. Choose a JPG, PNG, or WebP under Image file.
  3. Enter the desired number under Target size (KB). The initial value is 100.
  4. Select Run tool and review the target status and reported size.
  5. Inspect the preview and choose Download result.
  6. Open compressed.jpg and check it before attaching it.

The tool runs in your browser and uses the standard 25 MB source limit. Use a positive target up to 25,000 KB. The download is JPEG, including when the source was PNG or WebP. The compressor draws transparent portions over white. If the recipient needs transparency or requires a different format, use a compatible output workflow and check the final size with that format.

If the source already meets the requirements, you can use it directly. This compressor encodes a candidate JPEG from your input and does not simply return an existing file that is already below the target. A new encoding can change the picture. Compare the source size, format, and detail before deciding to replace it.

Understand what changes during compression

The tool prepares a working image that preserves the source proportions, with a longest edge of at most 2,048 pixels. It tries several JPEG quality settings at a given size. If those candidates are too large, it tries smaller dimensions as well. This means an output can have fewer pixels than the original even when you only entered a byte target.

JPEG quality describes how much detail is retained during encoding. Edges may acquire visible artifacts or smooth regions may look uneven when the target is tight. Reducing dimensions also removes detail because there are fewer pixels. Either change can help fit the file limit. The most useful result is the one that keeps the information the recipient needs at the size they will see it.

The search stops at a candidate that meets the target. It does not pad the file to the exact requested number of bytes. If no candidate meets the target, it reports Target could not be reached and returns the smallest result it found. Check the actual number. For example, a result that misses a self-imposed 95 KB target could still fit an official 100 KB cap.

Try a photo for a product listing

Suppose you have a 2.4 MB product image, and the listing site accepts JPEGs up to 300 KB. Start with a target near the permitted maximum, such as 290 KB. Download the result and open it at the size used in the listing. Look at the product’s edges and any visible text. Then check whether the output meets the site’s minimum dimensions as well as its size cap.

If the preview looks soft, return to the original and consider whether the subject takes up enough of the image. A crop that removes unused background can make more of the final pixels show the product, provided the site permits that crop. Keep every part intended for the listing. If you cannot crop, try a larger target within the documented limit and compare the result with the earlier candidate.

If the upload accepts several views, apply the checks to each image. One photo with a plain background can compress more easily than a photo of a textured surface. Identical targets can produce different output dimensions or visual quality. Review them as separate files rather than assuming the same setting gives the same result in every case.

Check images with text and diagrams carefully

For a scanned note or a screenshot, open the result and read the smallest meaningful text. A thumbnail can hide blurred characters. Compare the original and compressed file at the same apparent size. If a footnote or an ID becomes ambiguous, keep a clearer copy and see whether the receiving instructions allow a different format or size.

A PNG with transparency may be especially sensitive to a change in background. Look at the white areas in the JPEG and confirm that the subject still has enough contrast. For graphics that need to retain a transparent background, Image Format Converter offers output choices. Verify the result’s format, visible edges, and dimensions separately. The conversion tool and the compression tool take different input settings.

If the destination asks for exact width and height, Image Resizer lets you specify those pixels as a separate operation. Its output is PNG. Passing that output through the compressor can make it JPEG and can reduce its dimensions again. Check the file you will actually submit after the last step. Each additional export can change the answer to one of the receiving requirements.

Verify the file you will send

Open the downloaded JPEG from disk and inspect the exact size in bytes if the file is near the limit. Check the pixel dimensions, then review the important visual details. If you tried several targets, use a descriptive name to distinguish the checked file from earlier downloads. Keep the source in case you need to make a different version.

Finally, look at the destination preview if one is available. Make sure you selected the intended file and that the destination does not crop out important information. The compression is complete when the final image fits the byte limit, meets the format and dimension requirements, and remains useful to the reader.

Divide a combined upload limit across several photos

Suppose a form accepts three JPEGs, up to 200,000 bytes each and up to 450,000 bytes combined. You have an overview photo, a close-up showing a serial number, and a photo of a plain label. Giving each a 150 KB target is an easy starting point. It may be worth allocating more of the combined limit to the close-up if its small print becomes hard to read.

Try 140 KB for the overview, 185 KB for the close-up, and 110 KB for the label. These targets total 435 KB, leaving 15 KB under the combined nominal limit. Run Image Compressor on each original and check the actual file sizes afterward. If a conversion misses its target, the sum of your entered values will no longer tell you whether the results fit. Add the actual byte counts for the files you intend to attach.

For example, files measuring 129,400, 191,200, and 107,800 bytes total 428,400 bytes. The close-up missed the 185 KB target you set, but it still fits both the per-file cap and the combined limit. First check whether the text in that close-up is legible. If it is, you can keep that copy. If it needs more detail, see how much room the form gives you and try a new run from the original with a slightly higher target. Recheck the combined limit after replacing the file. Each saved version with a different size changes the total.

If the upload compresses or packages attachments itself, check how it defines the limit. A maximum for the uploaded JPEGs can differ from a maximum applied after a system creates an archive or encodes the files for transport. Test the exact attachments in the receiving form and use its reported errors to identify which cap applies.

Make the smallest required detail easier to preserve

Imagine the close-up includes a serial number within a wide photo of a machine. At the normal viewing size, the serial number occupies only a small part of the frame. A low target may leave it blurred even if the rest of the picture appears clear. Review the brief to confirm whether the recipient needs the whole machine in that particular file. If it accepts a separate detail shot, include the overview in one image and frame the serial number more tightly in the other. Keep enough surrounding detail to identify which plate or surface the number came from.

Prepare the crop from the original and compare its smallest characters with the first compressed attempt. Cropping away unused space can give the relevant detail a larger share of the output pixels. If the original is blurry because the plate was out of focus, the crop can make the blur more visible without making the characters readable. A new capture at better focus may improve the result more than another compression pass.

If you can take a new photo, use even light and avoid strong reflections over the text. Check the original before uploading it to the compressor. Look for the places where similar characters could be confused and check them again after export. This gives you a clear way to assess whether a new image helped, independent of its bytes or resolution.

Compare two candidates without compounding changes

For a single image with a 200 KB cap, you may want to compare a near-limit copy with a much smaller shareable copy. Run at 190 KB from the original, save that result, and return to the original for a second run at 110 KB. Avoid using the first JPEG as the source for the second. The first run may have already lowered the resolution or changed detail, so reusing it makes it harder to attribute differences to the second target.

Record each download’s size and pixel dimensions. Open them at the same displayed width and inspect a representative edge, smooth area, and any text. Then open each at its intended usage size. The smaller candidate may be good enough for a preview while the higher-limit copy works better as an attachment for review. Save the file that belongs to each purpose under a distinct name.

If the near-limit candidate looks almost identical to the source, check whether the source itself is already allowed. Keeping it can be a reasonable option when it fits the destination’s format and size rules. If a new encoding is required, keep the source separately. A later form may have a different limit or ask for PNG transparency, which the JPEG copy cannot supply.