Img Resize
Scale an image to an exact width and height or by a percentage, choosing between nearest-neighbour and area-average resampling, then preview and export as PNG or JPEG.
Runs in your browserEvery computation happens in your browser — your data never leaves this device.
Images are processed locally in your browser with Canvas and never uploaded.
Nearest neighbour keeps hard edges (pixel art, screenshots); area average gives smoother downscales.
Pick an image first (PNG / JPEG / WebP / GIF all work).
Result details
Pick an image and the resized preview shows up immediately.
What this tool does
- Fit an image to a platform limit: enter the exact width and height and the exported file is pixel-accurate without measuring anything by hand.
- Normalise a batch by long edge: scale everything by a percentage such as 50% and the composition stays identical while layouts line up.
- Upscale pixel art or screenshots: choose nearest neighbour so 2× and 4× enlargement keeps hard edges instead of smearing them.
- Shrink photos to save space: choose area average, which removes high-frequency detail rather than aliasing it the way nearest neighbour does.
Example
Input
A 4 × 2 image, percentage 50, resampling "nearest neighbour"
Output
Output size 2 × 1 Output pixels 2 Pixel ratio 25.00%
This is the real output of the pure pixel logic: the targets are round(4 × 0.5) = 2 and round(2 × 0.5) = 1, and nearest neighbour samples the source at each target pixel centre, so both output pixels come straight from the original.
Frequently asked questions
What is the actual difference between nearest neighbour and area average?
Nearest neighbour reads one source pixel per target pixel — fastest, hardest edges. Area average averages the whole source region a target pixel covers, which looks smoother when downscaling. When upscaling, an area-average region is smaller than one pixel, so it degrades to nearest neighbour and both modes agree.
If I fill in the width, do I still need the height?
No. With only a width the height keeps the original value (this does not preserve the aspect ratio), and vice versa; filling both gives an exact size. Only when both are blank does the percentage slider apply, and the computed size is rounded with a floor of one pixel.
How are transparent pixels treated by area average?
Colour is averaged with alpha weighting while alpha is averaged on its own. A fully transparent region therefore stays fully transparent (no black fringe from RGB zeros), and translucent edges mixed with opaque areas do not bleed colour.
What are the size limits?
The output canvas is capped at 16 million pixels and the percentage range is 1–400; anything larger reports an explicit parameter error. For very large sources, scale down to 50% first and repeat.
Are my images uploaded?
No. Pixels are read into a Uint8ClampedArray through the canvas, scaling is pure array maths, and the canvas encodes the export — there is no network request anywhere.
Keywords:resize image