Small Utility Lab

IMAGE DIMENSIONS, CALCULATED LOCALLY

Resize an image while keeping its proportions.

Set an image width or height and calculate the other dimension while preserving its original aspect ratio. Enter dimensions only; no image upload is needed.

Enter the image dimensions. For example, 1600 × 900 has a 16:9 ratio.

The other dimension is scaled proportionally. Values over 1,000,000,000 px are rejected.

Enter image dimensions and a target edge.

Calculated dimensions will appear here.

How the calculation works

The aspect ratio is original width divided by original height. When you set a target width, the new height is target width × original height ÷ original width. When you set a target height, the new width is target height × original width ÷ original height. For example, a 1600 × 900 image resized to 800 px wide becomes 800 × 450 px.

Enter dimensions from your image's properties or editor. Browser image elements also expose intrinsic dimensions through naturalWidth and naturalHeight; those values may be density-corrected CSS pixel dimensions. This calculator does not load the image or infer its dimensions. Calculations run in this browser tab. Page content updated November 3, 2026.

Good to know

How do I resize by width or height?

Choose the edge you want to set, enter its target dimension, and the calculator scales the other edge using the original width-to-height ratio.

Why must dimensions be greater than zero?

Zero or negative dimensions cannot define a valid scale or aspect ratio. The original and target dimensions must be positive whole numbers at most 1,000,000,000.

Does this resize or upload my image?

No. It calculates dimensions from the numbers you enter and does not open, change, upload, or save an image.

Can the calculated dimension be fractional?

Yes. The proportional result can be fractional; the display rounds to at most four decimal places while the calculation keeps the unrounded value.

Is it free?

Yes, during beta. Optional usage-credit plans are coming soon. Payments are not available and no credits are required.

Source

MDN documents the browser's intrinsic image width and height properties. Source checked November 3, 2026.

How it works

1. Enter the original image width and height in pixels. 2. Choose a target width or height. 3. Review the proportional dimensions and aspect ratio; only the numbers are processed in your browser.

Good to know

How is the new dimension calculated?

The other edge is scaled by the ratio between the target edge and its original dimension, preserving the original width-to-height ratio.

Can I enter zero or a fraction of a pixel?

No. Original and target dimensions must be positive whole numbers up to 1,000,000,000; the calculated edge may be fractional.

Do I need to upload the image?

No. Enter its dimensions manually. This page does not load, modify, or upload an image.

Is it free?

Yes, during beta. Optional usage-credit plans are coming soon. Payments are not available and no credits are required.