Skip to content

Image resizer to an exact KB and pixel size

Drop a photo, type the limit the form asks for (say 50 KB, or 20 to 50 KB) and, if needed, the exact size such as 600x600 px or 35x45 mm at 300 DPI. PixelFit finds the highest quality that fits, shows the byte count, and lets you download a JPG, PNG, WebP or PDF. Nothing is uploaded.

Your target

JPG · under 50 KB (at most 50,000 bytes) · original pixel size · white background

PixelFit aims at 50,000 bytes or less, so the file passes whether the form counts 1 KB as 1,000 or 1,024 bytes.

Fit, background and padding white background

Saving presets is part of Pro.

Pick a photo to fit it to under 50 KB (at most 50,000 bytes).

The result appears here: the exact byte count, pixel size and quality, the size before and after, a preview and a download button.

How the size search works

A JPEG gets smaller as its quality setting drops and as its pixel count drops. PixelFit uses both, in this order, so the picture keeps as much detail as the limit allows:

  1. Exact size first. The photo is cropped, fitted or padded to your width and height, then scaled down in halving steps with high-quality smoothing, which keeps edges sharper than a single big jump.
  2. Quality 92 first. Many photos already fit at that setting, and then one encode is enough.
  3. Quality search. Otherwise PixelFit tests the floor (quality 40 when the pixel size is free, 5 when you locked it) and halves the gap between a size that fits and one that does not, at most 8 encodes per pixel size.
  4. Shrink only if needed. If even the floor is too big and you did not lock the pixel size, both sides shrink by the square root of target/size (with a 3% margin), because file size follows the pixel count, and the search repeats.
  5. Minimums. Below a minimum, the quality goes up to 100; padding with a JPEG comment block is the opt-in last step.

Measured example: our 4032x3024 landscape test photo, saved at 600x450 px, is 45,125 bytes at quality 50 and 52,228 bytes at quality 60. For "under 50 KB" (50,000 bytes) the search therefore lands between quality 50 and 60. At 1200x900 px the same photo is still 157,936 bytes at quality 40, so with a free pixel size PixelFit would shrink it to about 654x491 px and search again.

Who makes PixelFit and why it runs without a server: see the about page.

Landscape test photo at 600x450 px, JPEG (measured 2026-10-31 with sharp; browsers differ by a few percent)
Quality Bytes Under 50 KB?
30 31,541 yes
50 45,125 yes
60 52,228 no
75 69,996 no
90 114,267 no

Formats, fit modes and DPI

  • JPG is what upload forms accept everywhere and the format the KB search works best with. Transparent areas get the background colour you choose (white by default).
  • WebP is usually smaller than JPG at the same quality. Safari cannot save it, and on iPhone and iPad neither can any other browser, because they all use Safari's engine; PixelFit tells you when that happens, so save JPG or PNG there.
  • PNG has no quality setting, so PixelFit tries full colour first, then a palette of up to 256 colours (the way GIF stores pictures), then a smaller pixel size. That suits screenshots, logos and signatures; photos look posterised in a small palette, so use JPG for them.
  • PDF wraps the compressed JPG in a one-page PDF (about 1 KB of overhead, counted in the limit), sized to the picture at your DPI or fitted on A4 or US Letter.
  • Crop to fill, the default when you set both a width and a height, gives the exact size by trimming the edges; pad keeps the whole picture at the exact size with bars in the background colour; fit inside keeps the whole picture within the frame, so one side comes out smaller; stretch distorts to the exact size. The download is named after the pixel size it actually has.

Ready-made targets

Each of these pages opens the same tool already set to that size, with the numbers for that target worked out.

What Pro adds

Everything above is free, with no limit on single photos and batches of 25. Pro is for people who do this often: batches of up to 500 photos with one ZIP download, saved presets for the forms you use, several photos merged into one PDF under a size limit, and HEIC batches. Pro runs on your device too. The pricing page lists every Pro feature and the refund policy; the privacy policy explains why no photo ever reaches a server.

Image resizer questions

How do I resize an image to an exact KB size?

Type the limit in "Max size (KB)", for example 50, pick JPG and drop the photo. PixelFit tries quality 92 first, then searches the quality in at most 8 encodes and, if the pixel size is free, shrinks the picture until the file is at most 50,000 bytes. The result shows the exact byte count before you download.

Is 50 KB 50,000 or 51,200 bytes?

Both are in use: Windows shows file sizes with 1 KB = 1,024 bytes, macOS with 1 KB = 1,000 bytes, and a form rarely says which it means. PixelFit keeps an "under 50 KB" file at 50,000 bytes or less and an "at least 20 KB" file at 20,480 bytes or more, so it passes either way. Megabyte limits work the same way: "under 1 MB" means at most 1,000,000 bytes, "at least 1 MB" at least 1,048,576 bytes.

Are my photos uploaded?

No. Decoding, resizing and compression run in your browser with the canvas API. The files never leave your device, which is why it also works offline once the page has loaded.

Can I set the size in mm or inches, like 35x45 mm?

Yes. Choose mm, cm or inch as the unit and set the DPI (300 is the usual print value). 35x45 mm at 300 DPI becomes 413x531 pixels, and JPG files carry the DPI in their header so print shops read the right size.

What if the form wants a minimum size, like 20 to 50 KB?

Fill in both fields. PixelFit first raises the quality to land inside the range. If a small picture is still below the minimum at full quality, you can turn on padding, which adds an invisible comment block to the JPEG file without changing a pixel.

What does Pro add?

Pro ($12 one-time) adds batches of up to 500 photos with one ZIP download, saved presets for the forms you use often, several photos merged into one PDF under a size limit, and HEIC batches. Single photos and batches of 25 stay free.

Founder price

PixelFit Pro opens soon

Lifetime Pro: batch of up to 500 images to an exact-KB ZIP, saved presets per form, PDF-under-size merge and HEIC batch. Reserve the founder price: 30% off $12 one-time when Pro opens. No payment is taken now. Everything on the free plan keeps working today.

We'll e-mail you once when Pro opens, with your founder price. No account, no newsletter. See the privacy policy.