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
Supported formats
Privacy
Runs entirely in your browser. Your input is never uploaded, stored, or sent to a third party.
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
- 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.
- Clamp every dimension into the safe 1–8192 pixel range and refuse a target beyond the pixel cap.
- Draw the decoded bitmap into a canvas of the target size and encode it in the source format (or PNG).
Usage
- Choose or drop an image.
- Enter a target width and/or height, or a percentage; keep the aspect-ratio lock on to avoid distortion.
- 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
{
"sourceMime": "image/png",
"sourceWidth": 200,
"sourceHeight": 100,
"outputType": "image/png",
"width": 100,
"height": null,
"percent": null,
"keepAspect": true
}Scale to 50%
{
"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
Send feedback
Tell us if this tool helped, report a problem, or suggest a tool. Only the message you type is sent — never the input you used in the tool.
Was this tool useful?
Prefer to write to us directly? See the contact page.