CompressPhotosCompress photos

Advanced photo compressor · Compress photos online

Drop a photo or a folder: set a byte budget or a service's limit, choose the format, and every file comes back measured.

No photo open yet
A wooden café table from above with potato wedges, dips, nachos, eggs and two drinks: the stage photo as this compressor wrote it

140.2 KB from 356.6 KB · WebP q77 · SSIM 0.958

Routine: Standard quality, each file in its own format, date and camera kept.

Photos are opened and compressed on this device. Nothing is uploaded.

One photo or a whole folder: one routine, a skyline of sizes with a line you drag, and a receipt for every file — measured, not promised.

Measured, not promised

79 tools in one photo compressor

11 groups down the left of the desk, from byte budgets and service limits to match levels, per-file reports and the batch. Every figure below was measured on a real photo by the same code that runs when you press Compress.

A busy shopping street split down the middle: the 381.4 KB original on the left, the 96.7 KB copy made for a 100 KB target on the right

381 KB → 97 KB

Type the size the form asks for

Set a 100 KB target and the search walks the quality down until the file fits. When even quality 40 is still too big, it takes pixels away in small steps and keeps as many as fit: this street came back at 786 × 1180 from 853 × 1280, and its row says exactly that.

Three photos from one set at match level Web: a night street at JPEG q69 (503.9 to 254.9 KB), a gerbera at q32 (169.5 to 35.7 KB) and a dog at q37 (151.3 to 42.8 KB), each with SSIM about 0.956

q69 · q32 · q37

One match level for the set, a quality per photo

Give the whole folder one match level instead of one quality number. Each photo is encoded, decoded again and scored, and keeps the lowest quality that still reaches the level. At Web (SSIM 0.955) a night street needed JPEG q69, a pink gerbera q32 and a dog portrait q37, and each row says so.

The desk with a set of photos and the Where it is going list: Gmail, Outlook, Exchange, GitHub and Discord limits, one of them chosen, with its source

Gmail · Outlook · GitHub

Aim the set at where it is going

Pick the service and the size rule follows: an email limit becomes a total for the whole set, with room for the third that mail encoding adds; a site's per-image limit becomes a target for each file. Each limit shows the page it was read from and the date, and the line above the save button says which one the set is aimed at.

The table view after a run: each photo's name, size before and after, saving, and applied quality with its SSIM

One row per file

A receipt for every photo in the folder

The table lists every file with bytes in and out, the quality it got, its new size and its SSIM: eight photos at match level Web came back between WebP q37 and q81, all at SSIM 0.955 to 0.958. The same rows go into the CSV report, with PSNR, the folder path and the reason for anything left alone, so a library can be checked before the originals are touched.

Coffee beans compressed at quality 40 on the left, and on the right the difference from the original amplified six times, mostly dark with brighter bean edges

34.5 dB

See where the bytes went

The difference view paints the change between original and copy six times stronger, so blocking and smeared texture show up before you save. Beside the sizes, every compare prints SSIM and PSNR for the pair. These coffee beans at quality 40 went from 260.4 KB to 76.6 KB with SSIM 0.948 and PSNR 34.5 dB.

The desk with twelve photos: the size skyline before and after, the set-total gauge at 2.0 MB inside 2 MB, and the contact sheet marking each photo Ready or Kept

3.4 MB → 2.0 MB

A whole set under one size

Give the set a total, or pick a service from Where it is going, and each photo gets a share in proportion to its pixels; what one file does not need passes to the next. Twelve photos came to 2.0 MB inside a 2 MB total here. Files already small enough are kept as they were, each row says why, and the per-file report goes in the ZIP as a CSV.

Choose one photo and it opens large, with a before-and-after that follows the routine as you change it. Choose several, or a folder, and every one becomes a bar on the skyline: drag the line down to see how many are over it before anything runs.

What this does

Compress photos on the device you are using, without sending them anywhere. One photo opens large, with a split before-and-after that re-encodes itself as you change the routine. A folder of four thousand opens as a contact sheet, with every photo a bar on the skyline above it, so you can see how many are too big before anything runs.

Either way there is one routine and one receipt. You declare the rule once; every file meets it in turn and gets a row: what it weighed going in, what it weighs coming out, the setting that won and — where nothing was written — the reason in words. At the end there is a single line of arithmetic, and a file or a ZIP shaped like the folder you started with.

Setting the rule

  • Quality is the setting most people mean by compression. It rewrites the same pixels more cheaply, and the three positions here are printed with the numbers the encoder actually receives.
  • Size per file has three modes. A ceiling keeps every file under a size at the batch quality, searching down only the files that are over it. A target does the same and, when quality 40 is still too big, steps the pixels down until the file fits — this is what forms that say "under 50 KB" need. A range adds a minimum, reached with a higher quality and never with padding.
  • Drag the line on the skyline to set the size and watch how many photos sit above it. It snaps to the sizes forms ask for: 10, 20, 30, 50, 100, 200, 300 and 500 KB, 1 and 2 MB.
  • The long edge cap is the largest saving available on camera files and the only part of the rule that cannot be undone from the output, so it is off until you turn it on.
  • Capture information — the date, the camera, sometimes the place — is kept by default here. What removing it would have saved is reported separately, so that choice can be made on a number.
  • Two skip rules keep the total honest. Files under the floor are left alone unless the size rule needs them, and a re-encode that came out larger is thrown away with the original kept in its place.

What it will open

JPEG, PNG and WebP are read and written, and AVIF is written by this site’s own encoder; GIF, BMP and AVIF are converted when the routine names another format as the output. HEIC (the iPhone’s format) opens only where the browser decodes it itself, which today means Safari, and is written as JPEG; anywhere else each HEIC is left alone with the reason on its row. TIFF is not opened yet. Every file is identified from its leading bytes rather than its extension.

Anything else in a folder is counted and left alone: video, audio, sidecar files, RAW from any camera, and the half of a Live Photo that is a movie. Those are reported as unsupported rather than as failures, which matters in a report somebody is meant to trust before they delete anything.

Two kinds of file are skipped on purpose even though they could be opened. A CMYK JPEG would come back with its colours shifted, and a photo beyond what this browser can decode safely is skipped with its dimensions on the row instead of taking the job down with it.

Questions

What is a match level?
One closeness for the whole set instead of one quality number: Share, Web or Archive (SSIM 0.930, 0.955 or 0.975). Every JPEG, WebP or AVIF in the set is encoded, decoded again and scored against the picture it was made from, and the lowest quality that still keeps the level is the one written. In one folder a detailed street and a plain sky come out at different qualities and the same closeness; each row and the CSV report give the quality and the SSIM it measured. A size rule, when one is set, decides instead.
What does the per-file report hold?
Save the manifest (CSV) from the Export panel, or find it beside the photos in the ZIP: one row per file with its path in the folder, bytes in and out, what was applied (format and quality), the reason for any skip, dimensions before and after, the size rule it ran under, and — when the match level or scoring is on — its SSIM and PSNR against the picture it was made from. The header names the routine, the browser and the encoders.
Why does AVIF download something?
No browser's canvas can write AVIF, so this site carries its own AVIF encoder (libavif built for WebAssembly, 3.4 MB). It is fetched from this site the first time a file is written as AVIF, and the size is printed on the AVIF button before you choose it. Your photos are not part of that request.
Can it aim at Gmail's or GitHub's upload limit?
Yes. Where it is going lists limits read from each service's own page, with the date they were read: Gmail and Outlook per email, Exchange's default, GitHub per image and Discord's free per-file limit (from a news report, marked as such). An email limit becomes a set total of about three quarters of it, because mail programs add roughly a third when they encode attachments. Services change limits, so the number on their page wins.
How many photos can go in one job?
One, or up to five thousand files or twenty gigabytes, whichever a folder reaches first. One photo opens a large before-and-after; a set opens the contact sheet. The ceiling is shown before a folder is read, and a folder past it is cut there with the rest left untouched.
What happens to the originals?
Nothing. Every file is opened for reading, and the results are a download you save: one file for one photo, a ZIP for a set. No original is modified, renamed or deleted by this site.
Can I compress a photo to an exact size in KB?
Yes. Set Size per file to Target and type the limit (1 KB = 1,024 bytes): each photo gets the highest quality that fits, and when quality 40 is still too big its pixels step down until it fits. Range adds a minimum for forms that reject files that are too small. The dedicated pages for 20, 50, 100 and 200 KB start with those numbers set.
Why do some files come back unchanged?
Because re-encoding them would have made them bigger, or they were under the skip floor, or they are a CMYK JPEG whose colours would shift. Each kept file says which on its row, and the original goes into the ZIP in its place.
Can I close the tab?
The record of which files finished is kept in this browser after every file, but the compressed copies live in the tab until you save them. Closing the tab mid-run asks first. In Chrome and Edge, choose Save into a file as photos finish and every copy is on disk the moment it is ready; elsewhere, Save what's finished writes a part ZIP. When you come back and choose the same folder, finished files are recognised, and you choose whether to re-run them or skip them.
Is anything uploaded?
No. Photos are decoded and encoded by your browser in this tab, and the site has no address that could receive one. You can check: open your browser's network panel and run a job.