πŸ—œοΈ
Photo & Image/Image Compressor

Image Compressor

Compress JPG, PNG and WebP to an exact target size β€” in your browser, no upload

100% LOCALTarget KBBatch 30JPG/PNG/WebPNo upload
The CalculatorPage 1
πŸ—œοΈ
Drop images here, or click to browse
Up to 30 files Β· 50MB each Β· nothing is uploaded
Binary-searches quality to land under this ceiling
Leave blank to keep original dimensions
PNG files are saved as WebP to keep transparency while hitting the size target.
πŸ—œοΈ

Add images to see the before/after size and download compressed files

Data Source & Legal Disclaimer
Effective: 2026Last updated: 2026-10-28Update: Manual review
Sources: MDN β€” HTMLCanvasElement.toBlob (quality parameter) Β· browser-image-compression (MIT)

Compression runs entirely in your browser using canvas re-encoding. The tool binary-searches quality until the output fits under your target size, then reports the exact result. PNG input is written as WebP to preserve transparency; JPEG input stays JPEG. No file leaves your device.

See all data sources & update policy β†’
How it worksPage 2

Why β€œtarget size” beats a quality slider

Most upload forms do not ask for a quality percentage β€” they reject anything over 100Β KB, 240Β KB, or 2Β MB. A quality slider makes you guess and re-export until it fits. This tool flips the problem: you name the ceiling, and it binary-searches the quality that lands just under it. Pixel dimensions are left untouched unless you set a max width, so the image keeps its framing.

Two honest limits. First, PNG is a lossless format with no quality knob β€” to hit a byte target we re-encode it as WebP, which keeps transparency and is smaller, but the extension changes. Second, compressing an already-compressed JPEG again stacks artifacts; if the source is already under your target, the tool leaves it alone rather than making it worse.

FAQ & detailsPage 3

About this tool

What is this tool?

Compress images to an exact file size online free. Set 100KB, 200KB, 240KB, 1MB or a custom ceiling, batch up to 30 photos, and download individually or as a ZIP. 100% browser-based, no upload.

Target KBBatch 30JPG/PNG/WebPNo upload

Bytes, Pixels, and Quality Are Three Different Levers

File size is the product of pixel count and how aggressively each pixel is encoded. Most people reach for the quality slider first, but cutting dimensions often saves more bytes with less visible damage: a 4000Γ—3000 photo displayed at 1200px wide carries nine times the pixels it needs. This tool exposes both levers β€” a byte ceiling and an optional max width β€” and leaves the choice of which to pull to you.

What Compression Actually Costs

JPEG throws away high-frequency detail in 8Γ—8 blocks; push it far enough and you get visible blocking around edges and banding in smooth gradients. WebP does better at the same byte count but is not accepted everywhere. The practical rule: compress once from the original, never re-compress an already-compressed file, and keep the source until the upload succeeds. If a result looks soft, raise the target size or reduce dimensions instead of compressing twice.

Which Format Should You Choose?

JPEG remains the safest choice for photographs that will be emailed or uploaded to an older portal. WebP wins on size at the same visual quality and supports transparency, but a few government and job-board forms still reject the extension. PNG is the right answer only when you need lossless pixels or hard-edged graphics β€” it is the worst format for hitting a byte ceiling. If a form demands JPG specifically, compress to JPEG; if it only caps the size, WebP usually gives you a sharper image for the same kilobytes.

Frequently Asked Questions

Why target a file size instead of a quality percentage?

Because upload forms reject bytes, not percentages. A form that says β€œmax 240KB” does not care whether your quality is 72% or 78% β€” it cares that the file fits. This tool binary-searches quality until the output lands just under your ceiling, so you set the constraint you actually have and skip the export-guess-repeat loop.

Why does my PNG turn into a WebP?

PNG is lossless and has no quality dial, so hitting a specific byte target means changing format. WebP supports transparency like PNG but compresses far better, which is why PNG input is written as WebP. If a system insists on a .png extension, resize the dimensions instead or use the image resize tool with a lower pixel count.

Can I compress several images at once?

Yes β€” up to 30 files per batch, 50MB each. Each file is compressed independently with the same target, and the result list shows the before/after size and the quality that was chosen. You can download them one by one or bundle the whole batch into a ZIP.

Does compressing reduce the pixel dimensions?

Not unless you ask it to. By default the tool keeps the original width and height and only changes encoding quality. Setting a max width is optional and useful when a 6000px photo only needs to be 1600px wide β€” cutting pixels usually saves more bytes at better visual quality than aggressive compression alone.

Are my photos uploaded?

No. Decoding, re-encoding and ZIP packaging all happen in your browser using canvas. There is no server request for the image data, which matters for passport photos, contracts, and client work under NDA.

Related tools

Joke of the Day
Oct 30

What do you call a cat that loves the beach?

Free core, no account

Keep the Free Edition Free

No signups, no data sold. Every tool is free to use β€” the free tier allows 5 downloads or saves per day, and the optional Pro plan ($7/mo, $59/yr) adds unlimited downloads, batch processing, white-label exports and an ad-free experience.

β˜•Support me on Ko-fiβ€” support the free tier

100% of proceeds go towards hosting & building more free tools.