Compress image

Supported formats

Inputs: PNG, JPG, JPEG, WebP, and BMP images.

Outputs: JPEG for JPG, PNG, and BMP inputs; WebP for WebP inputs.

Browser-local

Select one image and PixTools re-encodes it locally with your browser's Canvas APIs. Compression is available as a percentage or a maximum file size in KB. Percentage mode starts at 20%; 0% keeps original JPEG/WebP bytes, while PNG/BMP still convert to JPEG. The selected file is not uploaded to a PixTools server for compression.

Best for smaller files

Use it when a photo, product image, blog graphic, or email attachment is already the right size in pixels but needs a lighter download.

Limitations

The tool does not resize, crop, batch process, preserve animation, or edit metadata. Maximum-size mode aims to stay at or below your limit; it does not promise an exact size or optimal quality. PNG and BMP inputs export as JPEG, so transparency is flattened onto white.

Troubleshooting

If preview or download fails, try a smaller image, reduce the requested compression, refresh the page, or use a current Chrome, Edge, Firefox, or Safari release.

Need help?

See the image compressor help page for supported files, privacy details, compression behavior, PNG limitations, download notes, and troubleshooting.

Similar tools

Change dimensions with Image Resizer, convert formats with Image Converter, or enlarge small images with Image Upscaler.

Compressing an image without changing its dimensions

Image compression changes how the pixels are stored, not how many pixels the image has. That makes it useful when a picture already fits the layout, upload form, or email message, but the file itself is heavier than you want. PixTools keeps the original width and height, re-encodes the image in your browser, and shows the output size before download.

Compression versus quality

The control is intentionally written as Compression. PixTools measures the selected file's current size and an export at the lowest browser quality setting, then uses the slider as a scale between those endpoints. Lower compression keeps more detail; higher compression can make a smaller file, but may create blocky edges, banding, or softer textures.

Compress to a maximum file size in KB

Choose Maximum file size and enter a whole number from 1 to 25000. For example, 100 KB means at most 100,000 bytes, and 200 KB means at most 200,000 bytes. PixTools checks actual output bytes and enables download only when the current result meets that limit. Width and height stay unchanged.

If this attempt cannot reach the limit, the tool shows the smallest file it produced and blocks download. Increase the limit or resize the image first. An original JPEG or WebP already within the limit is returned unchanged. The size limit is remembered when you replace an image.

Why output size can vary

A requested limit may be too small at the original dimensions. If the original was already heavily compressed, exporting it again may have only a small usable range before quality drops sharply. Use the original and output size labels as the source of truth, then resize first when the image needs to be much smaller.

When to resize instead

If the image is thousands of pixels wide and only needs to appear inside a page, compression alone is often the wrong first step. Use the Image Resizer when you need smaller pixel dimensions, then compress the exported file if it still needs to be lighter. For a small embedded asset, Image to Base64 can encode the result as text.

Everything happens in your browser

PixTools uses browser image decoding and Canvas export for this tool. That keeps the workflow quick and local, but it also means format support depends on your browser. If a format behaves unexpectedly, try converting it with the Image Converter first.