Image Resizer

Resize an image to exact dimensions or a percentage, optionally locking the aspect ratio.

  • Runs locally in your browser
  • No upload required

Capabilities

  • Drag and drop
  • Local file intake
  • Download result

Try it

Read locally in your browser; never uploaded.

Leave empty to derive from the height, or use a percentage instead.

Optional; empty means derive from the width.

When set, this overrides the width and height.

Choose a file, then run the tool. Everything happens in your browser.

Supported formats

Input
image/*
Output
image/png, image/jpeg, image/webp, image/avif
Files
Local file intake and drag/drop

Privacy

Runs entirely in your browser. Your input is never uploaded, stored, or sent to a third party.

Processing
In your browser
Privacy level
Browser only

Resize the image to 100×50 pixels.

How it works

  • Decode the local file with the browser's image decoder.
  • Compute the target as 100×50 (aspect ratio locked, rounded once).
  • Draw the decoded bitmap into a canvas of the target size.
  • Encode the result as image/png at quality lossless.
  • The file never leaves the browser.

Methodology

  1. Resolve the target dimensions deterministically: a percentage scales both axes; a single axis with the lock derives the other by rounding once; two axes are used verbatim.
  2. Clamp every dimension into the safe 1–8192 pixel range and refuse a target beyond the pixel cap.
  3. Draw the decoded bitmap into a canvas of the target size and encode it in the source format (or PNG).

Usage

  1. Choose or drop an image.
  2. Enter a target width and/or height, or a percentage; keep the aspect-ratio lock on to avoid distortion.
  3. Run the resize and download the result.

Examples

These are examples, not current values: they use fixed inputs, while the interactive tool computes live results in your browser.

Halve the width, aspect locked

jsonSelect to copy
{
  "sourceMime": "image/png",
  "sourceWidth": 200,
  "sourceHeight": 100,
  "outputType": "image/png",
  "width": 100,
  "height": null,
  "percent": null,
  "keepAspect": true
}

Scale to 50%

jsonSelect to copy
{
  "sourceMime": "image/jpeg",
  "sourceWidth": 800,
  "sourceHeight": 600,
  "outputType": "image/jpeg",
  "width": null,
  "height": null,
  "percent": 50,
  "keepAspect": true
}

Limitations

Deterministic sizing

The target dimensions are computed by a small pure function so the same input always yields the same size: percentage scaling, single-axis derivation with a single rounding step, or two explicit axes.

Every dimension is clamped to 1–8192 pixels and a target beyond the 40-million-pixel cap is refused with a named finding rather than attempted.

Frequently asked questions

What does the aspect-ratio lock do?
When only one dimension is entered, the other is derived from the source ratio and rounded once. With both entered, the lock does not override explicit values.
Is my image uploaded?
No. Resizing happens locally in your browser; the file is never sent anywhere.

Sources

  1. PNG (Portable Network Graphics) Specification, Third Edition — W3C