Overview
Two ways to describe “smaller”
Sometimes you know what quality you can accept; sometimes you only know the number the form will reject you at. A quality slider answers the first question and a target size answers the second, and most compressors only offer one of them. This tool has both. In quality mode you pick a level and see the resulting size. In target mode you name a size in KB and the tool searches for the best quality that fits — shrinking the dimensions too, if you allow it, when quality alone will not get there.
Every encode in that search runs in your browser. The numbers on the readout are the real byte counts of the finished files, and if a target cannot be met the tool says so rather than handing you a file that is quietly too large.
How it works
What the compressor does
- Drop an image. The original size and true format appear at once. This is the “before” half of every figure that follows.
- Pick quality or target. Quality mode encodes once at the level you set. Target mode runs a search: it first tries a high quality, then the lowest, and if the answer lies between them it bisects that range until it finds the highest quality that still fits.
- Let it downscale if needed. If the lowest acceptable quality still exceeds the target, the tool reduces the dimensions by a fifth and searches again, up to four times. The readout reports any reduction.
- Read the result. Output size, the percentage saved, the quality it settled on, and whether the target was met. A file that came out no smaller is flagged rather than hidden.
- Download. The compressed file is named with a suffix so it sits next to the original instead of replacing it.
Settings
Each control, explained
- Compress by: Quality
- A single encode at the quality you choose. Fast, predictable, and the right mode when you care about how the picture looks more than its exact size.
- Compress by: Target size
- A search for the largest quality that lands under your KB figure. Slower, because it encodes several times, and the right mode when a form or a platform has a hard limit.
- Quality
- Ranges from 1 to 100 for lossy formats. 75 is the default. The slider is hidden when the output format is PNG, because PNG has no quality to trade.
- Target file size
- In KB, from 5 to 20 000. The tool aims for at or under this figure; it will not overshoot and call it close enough.
- Reduce dimensions if needed
- When on, a target that cannot be reached at any quality is retried at smaller dimensions. When off, the tool reports the miss and leaves the size alone.
- Output format
- Keep the source format, or write JPG, PNG, WebP — or AVIF, when this browser passes the encoder test. Changing format is often the single biggest saving available.
Formats and limits
What compresses well and what does not
The compressor reads JPG, PNG, WebP, GIF, BMP and usually AVIF, and writes JPG, PNG and WebP, plus AVIF where the browser can encode it.
- PNG output has no quality setting. Writing a photograph as PNG will almost always produce a larger file than the JPG you started with.
- A very small target on a very detailed image may be impossible without shrinking it. With downscaling off, the tool reports the smallest size it could reach instead of pretending.
- Target mode encodes the image several times — up to seven passes per size step — so a large photo on a slow device takes a few seconds rather than a fraction of one.
- Re-encoding a lossy file always loses a little more detail. Compressing a JPG three times in a row is worse than compressing the original once to the final settings.
- Metadata is dropped. EXIF, GPS and colour profiles are not carried into the compressed file, which also shaves a few KB.
- Images over roughly 100 megapixels are refused because the canvas allocation normally fails.
Worked example
A 3.8 MB phone photo to under 200 KB for a job application
Application portals commonly cap uploads at 200 KB. A 3.8 MB, 4000 × 3000 phone photograph in target mode with 200 in the box and downscaling on goes through this sequence: a high-quality encode at the full size comes out far too large; the lowest-quality encode is tried next, and on a detailed 12-megapixel photo it usually misses too. So the tool reduces the image to 3200 × 2400 and repeats. Somewhere between that step and 2560 × 1920 the lowest quality fits, and the bisection then climbs back up to the highest quality that still lands under 200 KB.
The readout would show the final dimensions, the quality it settled on, and “target met”. The result is sharp at any screen size a reviewer will view it at, because 2560 pixels wide is still far larger than the box on their screen. If you would rather control the dimensions yourself first, the image resizer gets the pixel count down before compression takes over.
Why use this
What sets this compressor apart
A real target mode
Name the size you need and let the search find it. Most tools make you guess a quality and re-check the result by hand.
Honest about misses
If the target cannot be reached, the readout says so and reports the smallest size achieved. There is no silent overshoot.
Measured, not estimated
Every size shown is the byte length of a finished encode. The percentage saved is calculated from the file you will download.
Format is part of the answer
Switching JPG to WebP is often the largest saving available, and the tool lets you compare it on the spot.
Works on the device
Even a dozen search encodes of a large photo finish faster than uploading it once. And nothing has to be deleted afterwards.
No limits per day
No account and no quota. Compress one file or a hundred, one after another.
Privacy
Where the encoding happens
On your device, in this tab. The image is decoded once and encoded as many times as the search needs, all in memory. No upload request is made in order to compress it. Nothing is written to local storage or a cache, and nothing survives the tab closing.
The page sets no cookies and runs no analytics. As with every website, the server that delivered the page can log the page request itself; the Privacy Policy describes what that involves and what it does not.
Questions
Frequently asked questions
How do I compress an image to under 100 KB?
Switch to “Target size”, type 100, and leave “Reduce dimensions if needed” on. The tool encodes the image at several quality levels to find the highest one that fits, and if even the lowest quality is still too big it shrinks the image in steps and tries again. The readout tells you which quality and size it landed on.
What quality setting should I use?
For photographs on the web, 70 to 80 is the usual range: visibly identical to the original at normal viewing sizes, and typically a third to a half of the bytes. Below 60 the loss starts to show in smooth gradients and around sharp edges. Above 90 the file grows quickly for very little visible gain.
Why did the file get bigger instead of smaller?
Because the original was already compressed harder than the settings you chose. Re-encoding at quality 80 a JPG that was saved at quality 60 produces a larger file with no more detail. The tool says so in the readout when this happens; keep the original in that case, or lower the quality.
Can I compress a PNG without losing quality?
Only slightly. PNG is lossless, so the encoder cannot throw detail away, and the browser’s PNG encoder does not expose a compression-effort setting. If the picture is a photograph, writing it as JPG or WebP will be far smaller; if it is a screenshot or flat graphic, lossless WebP usually beats PNG while staying pixel-exact.
Is WebP better than JPG for compression?
Usually, yes — at the same visible quality WebP is typically 25 to 35 percent smaller than JPG, and it keeps transparency. The trade-off is compatibility: some older software and a few upload forms still refuse WebP. If the file is going somewhere you do not control, JPG remains the safe choice.
Is the image uploaded to be compressed?
No. The image is decoded and re-encoded inside this tab. In target mode it may be encoded a dozen times in the search, and every one of those encodes happens on your device — there is no server involved.
About us
Who builds PixelEditor
PixelEditor is a small set of single-purpose image tools that run inside your web browser. Each one does a specific job — resize, crop, rotate, compress, convert, inspect, strip metadata — and each one has its own page so you can bookmark exactly the tool you keep needing.
The tools are built with the Canvas API and Web Workers. When you pick a file, the browser reads it from your own disk, works on it in memory, and hands you the result back as a download. There is no processing server involved, so there is no upload step, no queue, and no account.
Everything is free, there are no watermarks, and there is no paid tier that unlocks the real version. Read more about how PixelEditor works and why.