PNG Resizer

Uploads a PNG, decodes it onto an off-screen canvas, and resizes it to an exact target width and height using nearest-neighbor resampling, the same shared resampling helper used across this category's other resizing tools, then lets you download the result. A free online tool from Staaarter, right in your browser.

Runs locallyUpdated 2026-07-26

Overview

Introduction

This tool resizes a PNG to any exact width and height you specify, entirely in your browser.

It's the most direct, general-purpose resizing tool in the category, useful whenever you need a specific pixel size rather than a percentage scale or a padded canvas.

What Is PNG Resizer?

A client-side image resizer that reads an uploaded PNG's pixel data and resamples it to a new width and height using nearest-neighbor interpolation.

It's a thin, validating wrapper around the same shared resampling helper the file size reducer and aspect ratio changer tools also build on.

How PNG Resizer Works

For every pixel in the new output image, the tool maps back to the closest corresponding pixel in the source image (scaling the coordinates by the ratio between old and new dimensions) and copies its color.

This nearest-neighbor approach is fast and keeps hard edges crisp, at the cost of some visible blockiness compared to smoother resampling algorithms, especially when scaling up significantly.

When To Use PNG Resizer

Use it whenever you need a PNG at an exact target pixel size, for example to match a specific platform's required icon or thumbnail dimensions.

It's the right tool when neither a percentage-based shrink (file size reducer) nor a padded canvas change (canvas size changer) fits what you need.

Features

Advantages

  • Runs entirely client-side; the uploaded image is never sent to a server.
  • Simple, direct control: enter exact target dimensions and get exactly that size back.
  • Reuses the same tested resampling helper as the category's other size-changing tools, for consistent behavior.

Limitations

  • Doesn't preserve aspect ratio automatically; entering mismatched proportions will stretch or squash the image.
  • Nearest-neighbor resampling can look blocky when significantly upscaling, since it has no smoothing/interpolation between source pixels.

Examples

Resize to a required icon size

Input

A 512x512 PNG, target 128x128

Output

A 128x128 PNG resampled down from the original

Downscaling with nearest-neighbor produces a sharp, if slightly aliased, smaller version of the source image.

Resize without preserving proportions

Input

A 400x200 PNG (2:1), target 300x300 (1:1)

Output

A 300x300 PNG with the original content visibly stretched vertically

Since the target dimensions don't match the source's aspect ratio, the content is stretched to fill the new, differently-proportioned canvas.

Best Practices & Notes

Best Practices

  • Calculate proportional target dimensions yourself first if you want to avoid stretching, or use the aspect ratio changer for a ratio-driven resize instead.
  • For a purely percentage-based shrink aimed at file size, the file size reducer's scale-percent control may be more convenient.

Developer Notes

The lib function validates both target dimensions with the shared isValidPngDimension helper before delegating directly to resizeNearest; it deliberately doesn't attempt to preserve aspect ratio itself, leaving that decision to the caller or to the dedicated aspect-ratio tool.

PNG Resizer Use Cases

  • Matching a platform's required exact icon or thumbnail dimensions
  • Scaling an asset up or down to a specific target size
  • Preparing a batch of images at a consistent fixed resolution

Common Mistakes

  • Entering target dimensions with a different aspect ratio than the source and being surprised by stretching.
  • Using this tool when only a percentage-based scale (not exact pixels) is actually needed — the file size reducer may be simpler for that case.

Tips

  • If you need padding rather than stretching to reach a target size, use the canvas size changer instead.
  • Combine with the cropper first if you want to resize only a specific region of a larger image.

References

Frequently Asked Questions