LocalToolkit
HomeImage Tools › Image Resizer

Resize an Image to Exact Pixels

Contain, cover or stretch — and a preset library with the real numbers behind each one.

🔒 Runs in your browser. Nothing is uploaded — verify it in the network panel, or disconnect and try again.

Three ways to fit one rectangle into another

ModeWhat it doesYou get
ContainScales the image until it fits inside the box, touching one sideThe whole image, no cropping, some empty space
CoverScales until the box is fully covered, overflowing on one axisNo empty space, but one edge is cropped off
StretchForces the exact box on both axesThe exact size, with distortion if the ratios differ

For a profile picture or a social post, cover is almost always what you want, because the platform will crop to its own shape anyway and you should decide the crop rather than let it. For a product photo on a listing page, contain is safer — cropping a product is worse than leaving space around it. Never use stretch on a photograph; it is only appropriate for synthetic textures where distortion is invisible.

DPI is metadata, not pixels

The single most common misconception about resizing. A 1200 × 1800 pixel image printed at 4 × 6 inches is 300 dpi; the same file printed at 8 × 12 inches is 150 dpi. Nothing about the file changed — only the physical size it was mapped onto. DPI is a number stored in the file header (and frequently ignored), while the pixels are the actual information. That is why 'make this 300 dpi' is not a resizing instruction: what you mean is 'make this 1200 × 1800 pixels so it can be printed at 4 × 6 inches'.

Upscaling cannot invent detail

Enlarging an image interpolates between existing pixels. It does not recover information that was never captured, and photographs usually look soft or posterised when pushed beyond about 150 percent of their original size. Screenshots, diagrams and vector-like graphics tolerate upscaling far better because their content is piecewise-flat — there are fewer competing edges for the interpolator to confuse.

The presets, and why the numbers are odd

Platform dimensions look arbitrary and usually are — they are the output of an internal pipeline the platform never documented. Some notable ones:

Resize is a creative crop decision, not just a maths operation. Before choosing cover, look at what falls outside the target rectangle — the top of a head, the edge of a product, the horizon. A crop that removes a chin reads as a mistake.

How to use it

  1. Drop your image, or paste one.
  2. Pick a preset, or type exact width and height.
  3. Choose contain, cover or stretch.
  4. Resize, then check the reported output dimensions before downloading.

Worth knowing

  • DPI describes print mapping, not stored pixels — the same file can be any dpi.
  • Upscaling interpolates and cannot recover detail that was never captured.
  • Browser resampling quality is good for downscaling and approximate for large upscales.
  • Open Graph previews are 1200 × 630 pixels, used by most link unfurlers.

Limitations

  • No content-aware scaling or intelligent cropping — cover crops from the centre.
  • Downscaling in a browser uses a simpler filter than a professional editor.
  • EXIF orientation is applied by the browser but stripped from the output.
  • Animated images lose their animation when drawn to a canvas.

Frequently asked questions

How do I resize without stretching?
Use contain or cover. Contain keeps the whole image and adds empty space; cover fills the box and crops one axis. Stretch is the only mode that distorts.
What size is 300 dpi in pixels?
It depends on the printed size: multiply inches by 300, or millimetres by 300 then divide by 25.4. A 4 × 6 inch print at 300 dpi is 1200 × 1800 pixels; A4 is 2480 × 3508 pixels.
Can I upscale a small image?
You can, but it will not gain detail. Beyond roughly 150 percent of the original size photographs look soft or blocky. Screenshots and diagrams tolerate it better because they contain flat areas.
Why does my image look different after resizing?
Downscaling discards pixels and can soften fine texture; sharpening afterwards usually restores apparent clarity. If the aspect ratio changed, check that stretch was not selected.
Related tools
Image CompressorImage Format ConverterPhoto Size CalculatorPassport Photo MakerCompress Image to 10 KBCompress Image to 20 KB
Keep reading
How browser-only processing worksAll Image Tools toolsEvery tool on the site