CompressPictureCompress an image
Every re-encode happens on this device. No file is posted anywhere.

Photo resizer in KB

Width × height and a byte cap, solved together: pixels first, then the largest file under the cap — measured, never estimated.

Drop a picture. It is re-encoded the moment it opens, and the result is measured, not estimated.Drop, click or paste. One picture opens the tuner; a folder opens the ledger, where every file gets its own quality.
In —Out —Saved —

Nothing to hand?

Nothing leaves this tab: the file is decoded, re-encoded and measured by this page on this device.

Cap to aim for

Set it now or after opening. Photograph and signature fields usually sit in the 20 to 50 KB band; each body publishes its own figure, so read the form.

Pixels first, bytes last

A form that asks for 350 × 350 pixels and at most 50 KB is asking for two different things, and the order matters. Bytes depend on pixels: a resize after the byte search re-encodes the file and moves its size. So this page always works in the same order — orientation, crop, resize, encode, byte search, header writes — and the file you download is the file that was measured.

  1. 1Open the photo. Its size, pixels and format are printed straight away.
  2. 2Under Dimensions, choose W × H, a long edge, a percentage, a megapixel figure, or a physical size in cm, mm or inches at a DPI.
  3. 3If the box has a different shape, choose crop to fill or fit with padding. Nothing is stretched.
  4. 4Type the cap. The search aims under it by a small margin and lists every encode it tried.
  5. 5Read the pre-upload check, which measures the downloaded bytes: type, extension, size, pixels, DPI, baseline JPEG, colour and orientation.

Physical sizes and DPI

  • Pixels = size × DPI, with centimetres divided by 2.54 first. The exact figure and the rounding are printed before the encode.
  • The DPI is written into the JFIF header of a JPEG or the pHYs chunk of a PNG. It changes no pixel and costs at most 21 bytes, which are taken off the cap before the search.
  • Without a DPI, a physical size is turned into pixels at 300 DPI and nothing is written to the header — the page says so.

It will not invent detail.

A photo smaller than the box stays at the size it can fill, and the check reports the shortfall. Enlarging is a separate, labelled switch: it adds pixels by resampling, which a form may accept but which makes the picture no sharper.

Questions people arrive with

Why resize first and compress second?
Because every resize re-encodes the picture and changes its size. Set the pixels after the bytes and the file lands back over the cap. This page fixes the pixels first, then searches the quality for the largest file under your cap, in one run.
The form wants 3.5 × 4.5 cm. How many pixels is that?
It depends on the DPI. At 200 DPI, 3.5 cm is 275.6 pixels, rounded to 276, and 4.5 cm is 354. Choose cm, mm or inches under Dimensions, type the size and a DPI, and the page prints the exact figure and the rounding before it encodes. The DPI is written into the file's header too, without touching a pixel.
My photo has a different shape from the box. Will it be stretched?
Never. You choose: crop to fill the box (with a slider for where the crop sits) or fit the whole picture inside it with white padding. The page says which one is in use.
What if my photo is smaller than the size the form asks for?
Then the page says so, and gives you a box of the same shape that your photo can fill without inventing pixels. Enlarging is a separate switch that is off by default, and it is labelled for what it does: it adds pixels, not detail.
Is 50 KB 50,000 bytes or 51,200?
51,200 by default — a kilobyte counted as 1,024 bytes, the stricter reading for a cap. A switch under the cap counts 1,000 instead when a form says so, and the exact byte figure is printed either way.

Elsewhere on this site