Fit an Image to Exact Dimensions and File Size

Exact pixels, a maximum file size, DPI and fill behaviour — from the numbers your own form gives you. Nothing is uploaded.

Examples

Examples only — use the numbers your form gives you.

JPEG, PNG, WebP · up to 20 MB

No image to hand?

Size

Leave empty for no limit.

Output format

Add an image and a size to turn this on.

  • Processed on your device
  • No image upload
  • No account
  • No watermark
How it works

Fit an image to exact dimensions and a maximum file size in one step — the two are different constraints, and hitting only one is why a resize followed by a separate compress so often narrowly misses a form’s size limit anyway. Resizo reads the pixels or a physical size, the format, a byte ceiling and floor and, when one is asked for, a DPI record, then crops or pads, encodes and checks the finished file against every one of them at once, using a decoder and encoder the page hands to your own browser so the file is read and rewritten on your own device. Enlarging past what the source actually has cannot add detail, and a byte ceiling the picture cannot reach at a readable quality is refused in a sentence rather than silently ignored or handed back broken.

What this tool changes

Pixels
Decoded and written again
EXIF
Removed
GPS
Removed
XMP
Removed
ICC profile
Removed
DPI record
Set to the number you choose when you ask for one; otherwise no print size is written
Transparency
Depends on the format you save — PNG and WebP keep it, JPEG is flattened onto the background colour

A print resolution is written into the finished file only when you ask for one — by typing a DPI, or by giving the size in millimetres, centimetres or inches that has to become pixels — and only into a JPEG or a PNG, because a WebP carries no density field at all. The output format you choose decides transparency: PNG and WebP keep it, and a file written as JPEG has its see-through areas placed on the background colour you pick. Nothing else about the original file survives the encode.

How to fit an image to exact dimensions and file size

Width, Height, a maximum file size and the format sit right under the drop zone; everything else waits behind Advanced options for the visitor who needs it.

  1. Drop your image, or try the sample. JPEG, PNG or WebP, up to 20 MB. No image to hand yet? Try the sample photo to see the whole workflow first.
  2. Set Width, Height, a maximum file size and the format. The four fields under the drop zone are the whole form for most jobs — a plain pixel size, an optional byte ceiling, and JPEG, PNG or WebP.
  3. Open Advanced options for a physical size, a floor, or a fill choice. A size in millimetres, centimetres or inches, a DPI record, a minimum file size, Crop to fill, Fit inside or Stretch, a background colour and a lower-quality search all sit behind one disclosure — most jobs never need it.
  4. Press Fit image, then read the checklist. Every requirement Resizo can check — dimensions, format, file size, DPI — is listed as Requested against Result, with Meets or Fails in words. Download image appears once every check that was asked for has been met.

Every requirement at once

A form rarely asks for only one thing. “600 × 600, JPEG, under 100 KB” is three separate constraints — a pixel size, a format, and a byte ceiling — and a tool that only resizes leaves the other two to chance. Resizo reads every field that was filled in and checks the finished file against all of them at once, the same requirement-fitting engine /passport-photo runs against a verified authority’s numbers instead of your own.

BeforeThe unedited sample landscape at its original 800 by 534 pixels, before any crop, resize or byte search has been applied.
AfterThe same photograph cropped to a 600 by 600 square and searched down to fit a 50 KB ceiling.
A 1600×1067 JPEG at 384.2 KB came back 600×600 at 49.9 KB, cropped to fill and searched down to a 50 KB ceiling. The before image is shown at 800×534, a downscale of the 1600×1067 source; the after image is the tool’s own output, byte for byte.

Enlarging cannot add detail

Asking for dimensions larger than the area being kept is always possible — the engine will hit the exact pixel count either way — but stretching an 800 × 800 source up to 1600 × 1600 does not create the detail a camera never captured at that size. Resizo says so before the job runs, naming the source size and the target size, rather than letting “1600 × 1600 exact” be read as a claim about sharpness it never made.

Everything happens in your browser

The crop, the resize, the format encode, the byte search and the DPI record are all code this page hands to your own browser tab — there is no server this image is sent to, checked on, or held by. The same tab that shows you the photo is the one doing the work, which is also why a very large image on a very small phone can be refused outright: the limit is what this device can spare, not a policy.

Frequently asked questions

  • Can an image always be made smaller without changing dimensions?

    No — a byte ceiling and pixel dimensions are independent goals. Lowering quality shrinks a file, but a photo’s own content sets a floor on how small it can get before it turns to visible blocks, and if that floor sits above the ceiling asked for, Resizo refuses the job in a sentence rather than quietly exceeding the limit or shrinking the dimensions instead.

  • Does resizing to 600 × 600 make the file 100 KB?

    No — pixels and bytes are different constraints. Two photos that are both exactly 600 × 600 can encode to very different byte counts depending on what is actually in the picture, so a maximum file size has to be asked for and checked on its own, which is what the Maximum file size field and the search behind it do.

  • Does DPI change pixel dimensions?

    No, not by itself. DPI is a print-resolution label written into the file’s header. A size given in millimetres, centimetres or inches is converted to pixels using a DPI exactly once, at that conversion; changing the DPI on an image already sized in pixels only relabels the file; it does not touch a single pixel.

  • Can converting JPG to PNG improve quality?

    No. PNG is lossless from whatever pixels it is handed, but a JPEG has already discarded detail during its own encode, and converting the result to PNG cannot restore what that step threw away — it only stops throwing away anything more.

  • What happens if the requirements conflict?

    Resizo refuses rather than breaking one. If the requested dimensions and the byte ceiling cannot both be met — even at the lowest quality this tool will use — the panel says so in a sentence and offers the levers that failure actually has: a lower quality, WebP, or a different limit, never a silent, smaller-than-asked-for file.

You are on the Image Size Fitter tool.