Compress photo to exact KB size

A photo size reducer that compresses any image to the exact KB size your form asks for.

  • Free
  • Online
  • No limits
  • Secure

Make it fit:

KB
Runs on your deviceNo watermarkEXIF & GPS stripped

About this image compressor

Most compressors hand you a quality slider and leave you to guess. PhotoToKB works the other way round: you name the file size, and it finds the settings. Type the limit your form states — or tap one of the four it states most often — and what comes back is a JPG under that limit, at the best quality that would still fit inside it.

It exists because upload boxes count bytes. Exam registrations, scholarship portals, passport and licence renewals, university admissions and job applications nearly all cap the photo they will accept, and a picture straight off a recent phone is two to six megabytes — thirty to three hundred times over a 50 KB ceiling.

There is no account, no watermark, no daily quota and no queue, because there is no server behind any of it. One photo or thirty, as many times as you like — a batch comes back as a zip with every file already under your limit.

How to compress a photo to an exact KB size

  1. Drop your photos onto the box above, or tap it to pick them from your gallery, your camera or your files. One, or up to thirty at once.
  2. Set the ceiling — tap 20, 50, 100 or 200 KB, or type the exact figure your form asks for into the Custom box. Every photo you picked is held to it.
  3. Press Compress, check the size each one landed on, rename the file if you want to, then Download — one JPG for a single photo, one zip for a batch.

That is the whole procedure. Nothing is saved between steps and nothing waits on a network, so a second run with a different limit takes as long as the button takes to finish — useful when a form turns out to want 50 KB rather than the 100 KB you read. For what happens in the second between pressing and seeing the result, read how it works below.

How it works

Three taps and no account to create: pick the photo, name the size, download the file. What sits between the second tap and the third is a search rather than a fixed setting, which is the part worth knowing about.

What happens after you press Compress

Your browser decodes the photo — reading the rotation flag your camera wrote, so one taken sideways comes out upright — then encodes it as a JPEG over and over, each pass at a different quality, closing in on the highest quality whose file still lands under your limit. If the limit is too tight for quality alone, the pixel dimensions come down and the search runs again. It takes a second or two per photo, and every pass happens on your own device.

What you get back

  • A JPG named after your original with the target appended —photo-50kb.jpg — or, for a batch, one zip holding every photo already named that way.
  • The original size, the final size, the percentage saved and the output dimensions, each measured on the file the Download button is holding.
  • No EXIF, no GPS, no timestamp and no watermark.
  • A warning before you download if the limit turned out to be too small to reach, saying the smallest it managed.

Two things it will not pretend about: a photo already under your limit is left alone and reported rather than re-encoded into a worse copy of itself, and a limit nothing could meet is named as such instead of quietly missed.

How it keeps your photo sharp

Hitting a file size is easy if you do not mind what comes out the other end. Three things stop this from being that.

It searches for the quality rather than guessing it

Your photo is re-encoded again and again, each pass halving the range the answer can still be in, until the highest JPEG quality that fits your limit is pinned down — eight passes, which lands within about one percent of it. The file kept is the largest one that came in under the ceiling, because every byte you were allowed and did not spend is detail thrown away for nothing.

When quality alone cannot get there, the pixels come down

Twenty kilobytes of a twelve-megapixel photo works out at roughly one bit for every eight pixels, and no quality setting reaches that — the structure of the file costs more than that on its own. So the tool scales the image down and searches the quality again, and repeats up to six times. Each step aims at the size the budget implies rather than nibbling, so it converges in two or three rounds. A smaller photo that is still crisp beats a full-size one crushed into blocks, and forms police file size far more strictly than pixel size.

Sideways photos come out upright

A phone held sideways does not rotate the pixels it saves; it writes a rotation flag beside them and leaves the picture on its side. Re-encode without reading that flag — which is the standard bug in browser-based compressors — and the photo arrives in the form rotated 90 degrees, which is a rejection on its own. This tool reads the flag and bakes the rotation into the pixels, so the file you download is the way up you saw it.

When it finishes you get the original size, the new size, the percentage saved and the output dimensions, every one of them measured on the actual file the Download button is holding. Two situations it will not pretend about: if your photo is already under the limit you picked it says so and stops, rather than handing back a re-encoded copy you did not need; and if the limit cannot be reached at all, it tells you the smallest it managed instead of quietly missing.

Which KB limit should you choose?

Use the figure the form states, exactly as written. Where it gives a range, aim at the top of it — quality only improves as the ceiling rises, and nothing rewards you for coming in far under.

Compress a photo to 20 KB

About as tight as forms get. Expect visible softening in hair, foliage and small text, and a plain background to survive it better than a busy one. Choose it only when the form names that number.

Compress a photo to 50 KB

The most common cap on exam and application forms, and enough for a clean head-and-shoulders photo at passport dimensions.

Compress a photo to 100 KB

Comfortable for almost any portrait — skin tones stay smooth and edges stay clean. A sensible pick when a form only says "small".

Compress a photo to 200 KB

Room to spare, and the right choice for a scanned document, an ID card or a marksheet, where small printed characters have to stay readable.

Any other size

Type it into the Custom box — 35 KB, 75 KB, 300 KB, whatever the wording says. And read the rest of the requirement while you are there: some forms fix the pixel dimensions or the aspect ratio as well. This tool targets the file size, and reports the dimensions it ended up with so you can check them.

Which image formats can it compress?

The reading is done by your browser's own image decoder rather than by a converter shipped with the page. That keeps the page small and the list long, and it is why two of the rows below depend on which browser you are in. It also means the format is worked out from the file's own first bytes, so a photo someone renamed to .jpg is still read correctly.

  • JPG / JPEG — The usual photo format, and what every run saves as.
  • PNG — Screenshots and logos. Transparent areas come out white.
  • WebP — Saved from the web. Converted to JPG, which forms accept.
  • HEIC / HEIF — iPhone photos. Works on Safari, on iPhone and Mac; other browsers cannot read them yet and will say so.
  • AVIF — The newer web format. Read directly, no converter needed.
  • GIF — Read, including animated ones — the output is the first frame.
  • BMP — Old Windows bitmaps, usually huge. Read directly.
  • SVG — Icons and vector drawings, rendered to pixels at 1600px on the long edge.
  • APNG — Read like a PNG, and the output is its first frame.
  • TIFF / TIF — Scans. Safari reads them; most other browsers do not, and will tell you.
  • JPEG XL — Same as TIFF — Safari reads it, most browsers do not yet.

Choose a file this browser cannot read and it says so the moment you pick it, along with what to do instead — not after you have sat through a Compress that was never going to work. Whatever goes in, a JPG comes out, because a JPG is what forms accept. Two of those conversions change more than the file size, so they are spelled out under the result: an animation becomes its first frame, and transparency becomes white.

Nothing is uploaded — and how to check

There is no server to upload to. Your photo is decoded, drawn and re-encoded by this browser, and the Download button points at the result sitting in your own device's memory. Every step happens in the tab you are looking at.

You do not have to take that on trust. Open your browser's developer tools, watch the Network panel, and compress something: no request goes out carrying your image. Or turn your Wi-Fi off once this page has finished loading — the tool keeps working, because there was never anything on the other end. Theprivacy policy walks through the same check in more detail.

Re-encoding has a second effect worth knowing about: the metadata block does not survive it. The JPG you download carries no camera model, no timestamp and no GPS coordinates, which matters when the photo is going somewhere you cannot see afterwards.

Why forms keep rejecting your photo

The rejection is usually some variant of "file too large", with no hint about how large would have been acceptable. What the portal is measuring is the number of bytes in the file, and a phone camera produces a great many of them: twelve megapixels of detail, saved generously, arrives as two to six megabytes against a ceiling of fifty kilobytes.

The trap is that a photo can be made to look smaller withoutbeing smaller. Cropping it, or opening it in a gallery app and picking a smaller display size, often leaves the file close to the size it started at. The upload box does not care what the picture looks like — it counts bytes. Compression is what moves that number.

Which is why this tool starts from the number instead of ending at it: you give it the ceiling the form set, and it works backwards to the best photo that fits underneath.

Questions and answers

Does my photo get uploaded anywhere?

No. Everything runs inside your browser using the Canvas API. Your photo is never sent to a server, and your browser’s network tab will show no request carrying it.

Will my photo still look sharp?

Yes. The tool searches for the highest JPEG quality that still fits your limit, and only reduces the pixel dimensions when quality alone cannot get there. A slightly smaller photo at good quality holds up better than a full-size one squeezed too hard.

Which formats can I use?

JPG, PNG, WebP, AVIF, GIF, BMP, APNG and SVG all work in every modern browser. HEIC photos from an iPhone, along with TIFF scans and JPEG XL, work in Safari on iPhone and Mac, because the format support comes from your browser rather than from us — in a browser that cannot read one, the tool says so as soon as you pick the file and tells you what to do instead. The result is always saved as a JPG, because that is what almost every form expects.

Can I compress an iPhone HEIC photo?

On an iPhone or a Mac, yes — Safari reads HEIC, so pick the photo and compress it as usual, and the download is a JPG your form will accept. On Windows or Android, most browsers cannot read HEIC yet. The quickest fix is on the phone: Settings → Camera → Formats → Most Compatible, which saves new photos as JPG. Sharing the photo through an app that converts it, or emailing it to yourself, also works.

What happens to an animated GIF or a transparent PNG?

A JPG holds one still image with no transparency, so an animation becomes its first frame and see-through areas become white — white because these photos go onto forms, where a signature or a logo belongs on paper. The tool says which of the two happened underneath the result, so you know before you download.

Is EXIF and GPS data removed?

Yes, as a side effect of re-encoding. The file you download carries no camera, date or location metadata.

What if my photo is already under the limit?

Then you do not need to compress it, and the form will accept it as it is. The tool says so as soon as you pick the photo and shows you its current size, rather than spending a second to hand the same file back. Choose a lower limit if you want it smaller anyway.

How many photos can I compress?

As many as you like, and up to thirty in one go. Pick a single photo and you get a single JPG back; pick several and every one of them is held to the same limit and handed back as one zip file. There is no account and no daily quota, because there is no server counting your files. The thirty is only about how long your own device would spend on the batch — when it is done, choose the next thirty.

Does it work on a phone?

Yes, and phones are what it was designed around. Tap the drop zone to pick a photo from your gallery or camera, choose the limit, then tap Download. The compression uses your phone’s own processor, so a very large photo takes a moment on an older device.