Image Compressor
Open a picture, choose JPEG or WebP, and enter the file-size limit you need. The compressor tries up to eight quality settings and keeps the highest tested quality that fits, showing the actual bytes and a before-and-after preview. You can also choose a quality directly. Small targets may be unreachable without reducing the pixel dimensions first; the result says when it misses. Your picture stays in this browser, with no upload or account.
Drop a picture here, or choose one below.
The compressed picture appears here.
· or drop one anywhere on the stage
No picture open yet. Choose one, or drop it on the stage.
A target is searched between quality 5 and 95, in at most 8 trial encodes, and the quality it settles on is the one shown. KB here means 1,024 bytes and MB means 1,024 KB, and the exact byte count is printed beside the size so there is nothing to guess at. Smallest for photographs. JPEG has no transparency, so a clear background is filled with the colour you pick.
Common image file size targets
Type an exact byte count when an upload form uses decimal KB or MB. This tool reads KB as 1,024 bytes and MB as 1,048,576 bytes. JPEG and WebP can trade quality for size; keeping PNG does not optimize it.
| Upload limit | Conservative target to type | Check after compression |
|---|---|---|
| 50 KB | 50000 bytes | Fine detail and small lettering |
| 100 KB | 100000 bytes | Photo quality and actual bytes |
| 200 KB | 200000 bytes | The encoded result fits the limit |
| 500 KB | 500000 bytes | The encoded result fits the limit |
| 1 MB | 1000000 bytes | The encoded result fits the limit |
| 2 MB | 2000000 bytes | The encoded result fits the limit |
Common questions
- How do I compress an image to a specific file size?
- Open the picture, choose JPEG or WebP under Output, select Target size, and enter a limit such as 500 KB, 0.5 MB or 250000 bytes. A bare number means KB. The search tries quality 95 and, if needed, quality 5 before narrowing the range, using at most eight encodes. It keeps the highest tested quality that fits and checks the final downloaded file size. This is a maximum target, not a request to pad a file to an exact size. If the result is over the limit, reduce the dimensions in Image Resizer and try again.
- Which quality setting should I use?
- Use Target size for an upload limit. Use Quality when you want to choose a JPEG or WebP encoding setting from 1 to 100; around 80 is a useful starting point for photographs, then compare fine details in the preview. The same quality number is not comparable across formats or browsers. Quality 100 still does not promise lossless JPEG or WebP output. Keeping PNG rewrites a lossless image and ignores the quality setting. WebP export depends on the browser encoder; if it is unavailable, choose JPEG or keep a supported source format.
- Why did my PNG not get smaller?
- Keep PNG redraws the picture and writes it with the browser encoder. It does not optimize PNG compression or reduce its palette, so the result can be larger. To make a PNG photograph smaller, choose JPEG or WebP if the destination accepts that format; WebP retains transparency and JPEG asks for a background. A requirement to keep PNG and reach 100 KB is not a supported target-size search here. Keep the original when the rewrite offers no benefit.
- What happens to a transparent image saved as JPEG?
- The tool asks you what to put behind it first. JPEG has no alpha channel, so transparency cannot be stored at all: some tools fill it with black without telling you. After decoding, this one reads the alpha channel a strip at a time, so a large picture never needs its whole pixel buffer at once, and the moment it meets a pixel that is not fully opaque it stops and asks for a background colour. White and black are one press each, and the colour well takes any other colour. WebP and PNG both keep transparency, so choosing either of those never raises the question.
- Is the image uploaded to compress it?
- No. The browser decodes, draws and encodes the picture locally, including each trial in the quality search. Image bytes are not uploaded or stored in browser storage. The page remembers only the aim, target text and output format. Download the result before leaving; the picture is not restored on your next visit.
- Is there a size limit on the file I can open?
- There is no file-byte cap, but this tool checks decoded images against a 25-megapixel processing cap. That is a tool limit, not a universal browser limit: available memory and canvas support vary by device and browser. A 6000 by 4000 photo is 24 megapixels; a 6000 by 5000 photo exceeds the cap. Resize an oversized picture first, then compress the smaller copy.
- How exact is the size it reports?
- It is the encoded file's own size, measured after the encode rather than estimated from it. The trial encodes during a search are counted from the base64 the browser returns, which carries three bytes in every four characters, and the file you download is then written once at the quality the search chose. The size shown beside the After pane is that file's size, and the line under the stage prints it again as an exact byte count next to the rounded KB, because KB here means 1,024 bytes and a limit written in decimal kilobytes would otherwise be out by about two percent.
- How do I compress a photo to 100 KB, 200 KB or 2 MB?
- Choose Target size and enter 100000 bytes, 200000 bytes or 2000000 bytes for a decimal upload limit. Use JPEG for an ordinary photograph, or WebP if the receiving site accepts it. Download only after checking the measured byte count. If even the lowest tested quality is too large, resize the picture to smaller pixel dimensions, then try again. A quality search cannot always reach a very small target.
- Does reducing KB or MB also change the image width and height?
- No. This compressor keeps the decoded pixel dimensions and changes the encoding format or quality. If an upload form specifies both pixels and file size, crop or resize first, then compress that exported image. Image Resizer sets pixel dimensions or a percentage; this page handles the final byte limit. A lower quality setting is not a percentage reduction in file size.
- How do I prepare an image for Discord, email or a website?
- Use the limit shown by the destination, choose an accepted format and check the final byte count. For email, leave room for other attachments and message encoding overhead. For a website, JPEG suits photographs and WebP can retain transparency if the site accepts it. Set any required thumbnail, profile or post dimensions in Image Resizer first. This tool prepares a file; it does not upload it, install a WordPress or Shopify plugin, or validate platform-specific rules.
- Can I compress a photo on an iPhone, Android phone, Mac or Windows computer?
- Open this page in a current browser, choose a local picture, select JPEG or WebP and enter the target. Download the result, then choose that downloaded file in your upload form or message. If a phone photo is HEIC and the browser cannot decode it, export a JPEG copy first. This is a browser workflow, with no native app installer or photo-library synchronization.
- Can I compress multiple images at once?
- This compressor processes one picture at a time. Download it, then choose Change image for the next picture. Image Resizer can resize a batch, but there is no batch file-size search or ZIP export on this page.
- Does this preserve animation or create a PDF?
- No. The output is a still JPEG, WebP, or a PNG when keeping PNG input. An animated image is drawn as one frame; use GIF Compressor to keep an animated GIF. To make a size-limited PDF from pictures, create it in Image to PDF and then use PDF Compressor on the document. This page does not rewrite SVG markup or encode TIFF, HEIC, GIF, video or PDF files.
The quality the search settled on and the size it reached are both exact and both shown. JPEG and WebP discard detail to get smaller, so a target size is reached by trying qualities, and a target that cannot be reached is stated rather than approximated.