Skip to main content
ToolNimbly

Image Resizer

Resize by pixels or percentage with the aspect ratio locked, and see the exact output dimensions before you download.

Runs in your browser. Nothing you enter here is uploaded to a server.

Loading the tool…

Embed the Image Resizer

Paste this into any page. The tool runs in place, and the credit line below it links back here.

Appearance

Adjust height if your layout needs it.

Please keep the “Powered by” line. It is the only thing we ask in return, and it is what keeps the tool free to embed.

What this tool does

Change the pixel dimensions of a JPG, PNG or WebP image in your browser. Enter a width or a height and the other follows automatically while the aspect ratio is locked, or unlock it and choose how the image should fit the box you specify. The resulting dimensions and file size are shown before you commit to a download, so there are no surprises. Nothing is uploaded at any point.

How to use this tool

  1. Step 1: Add an image

    JPG, PNG or WebP, up to 20 MB and 40 megapixels. The current dimensions are shown as soon as it loads.

  2. Step 2: Enter the size you want

    Work in pixels or as a percentage of the original. With the aspect lock on, filling in one dimension calculates the other.

  3. Step 3: Choose a fit mode if the ratio differs

    Contain fits the whole image inside your box. Cover fills the box and crops the overflow. Stretch distorts the image to match exactly, and is flagged as such.

  4. Step 4: Pick an output format and download

    Keep the original format or convert. For JPEG output you also choose the background colour used where the original was transparent.

Worked example

Preparing a hero image for a web page

A 5,472 × 3,648 camera photo needs to become a 1,600 × 900 banner.

Original aspect ratio
3:2
Target aspect ratio
16:9 — different, so fit mode matters
Contain
1,600 × 1,067 scaled down, letterboxed to fit
Cover
Exactly 1,600 × 900, with the top and bottom cropped
File size
About 20 MB down to roughly 280 KB

Cover is almost always what you want for a banner, because letterboxing wastes the space. Use the cropper when you need control over which part gets cut.

How resizing works

The image is decoded, drawn onto a canvas at the target dimensions with the browser high-quality smoothing enabled, and re-encoded. The pixel grid is rebuilt from scratch, which is why the result is a new image rather than an edit of the original.

  • Scaling down discards pixels and looks clean. Scaling up invents them and always looks softer — no resizer can add detail that was never captured.
  • The aspect ratio lock keeps the original proportions exactly, calculating the second dimension from the first.
  • EXIF orientation is applied before resizing, so a portrait photo is measured by how it looks rather than how it is stored.
  • Output dimensions are capped at 40 megapixels to prevent a very large canvas exhausting device memory.

Sources and methodology

ToolNimbly performs this work locally in your browser using the method shown above. Read how ToolNimbly tests calculations and generated documents.

Resampling, aspect ratio and output sharpness

Resizing is not just changing width and height metadata. The browser resamples the pixel grid, estimating new pixels from the old ones. Shrinking usually looks clean because several source pixels contribute to one output pixel. Enlarging must invent intermediate detail, so it can soften edges without revealing information that the original never captured.

Locking the aspect ratio prevents circles becoming ovals and people appearing stretched. “Contain” fits the whole image inside a box and may leave unused space; “cover” fills the box by cropping an edge. Social platforms can crop again after upload, so keep important content away from the boundary and use the platform’s current recommended dimensions. Export format and quality still matter after resizing, and a smaller pixel grid does not guarantee a small file if it is saved inefficiently.

Limitations and privacy

What this tool does not do

  • Enlarging an image cannot recover detail. The result will be softer than the original, and no amount of smoothing changes that.
  • Stretch mode distorts proportions. It is available because it is occasionally needed, and it is visibly warned about because it usually is not.
  • Resampling quality is set by the browser rather than by this tool, so results can differ slightly between browsers.
  • Presets show their exact pixel dimensions and are conveniences only. Platform requirements change, so confirm against the current official guidance.
  • Maximum 20 MB and 40 megapixels input, 40 megapixels output.

Your image is decoded, resized and encoded in this browser tab. It is never uploaded, and metadata including GPS coordinates is stripped from the output by default.

Frequently asked questions

How do I resize an image without stretching it?

Keep the aspect ratio lock on and enter only one dimension — the other is calculated for you. If you need to hit an exact box whose ratio differs from the original, use cover, which scales and crops rather than distorting.

What is the difference between contain and cover?

Contain fits the entire image inside your dimensions, which can leave empty space at the sides. Cover fills the dimensions completely and crops whatever falls outside. Contain shows everything; cover fills everything.

Can I make a small image bigger without losing quality?

Not meaningfully. Upscaling interpolates new pixels from existing ones, so the result is larger but softer. Going beyond about 200% rarely looks acceptable. Start from the highest-resolution original you have.

What size should a web image be?

For a full-width hero, 1,600 to 2,000 pixels wide is usually plenty. For content images, match the display width — often 800 to 1,200 pixels. Anything beyond the display size is bandwidth spent on detail nobody sees.

Does resizing reduce the file size?

Substantially, because file size scales roughly with pixel count. Halving both dimensions leaves a quarter of the pixels, and the file usually shrinks by a similar proportion — often more than a quality reduction would achieve.

Read more about this

Other tools people use alongside the image resizer.

  • Image Cropper

    Crop a photo freehand or to a fixed ratio, with zoom, rotate and flip. Keyboard and numeric controls included; the crop exports at full resolution.

  • Image Compressor

    Compress JPG, PNG and WebP images in your browser. Adjust quality, cap dimensions and download one file or a ZIP. Nothing is uploaded to a server.

  • JPG Compressor

    Reduce JPG and JPEG file sizes with a quality slider and optional dimension cap. Batch several photos at once and download them as a ZIP.

  • PNG Compressor

    Shrink PNG files with a lossless pass that keeps every pixel, or a lossy mode that reduces colours for a much smaller file. Transparency is preserved.

  • Image to PDF Converter

    Turn JPG, PNG and WebP images into a single PDF. Reorder pages, pick A4 or Letter, set margins and keep every aspect ratio intact.

Part of Image Tools. Last reviewed .