Image Aspect Ratio

Shows an image's aspect ratio from a file or from width and height, and calculates the crop and padding for a target format.

Drag an image here or click to choose: PNG, JPEG, WebP, AVIF, HEIC, GIF, BMP, TIFF, PSD, SVG The size is read from the file header in your browser; the file is not uploaded anywhere.

How the aspect ratio is calculated

The width and height are divided by their greatest common divisor: for 1920 × 1080 it is 120, which gives 16:9. When there is almost nothing to reduce, the ratio stays long: a 1366 × 768 screen has a ratio of 683:384. Next to it we show the closest standard ratio and the difference from it in percent; for 1366 × 768 that is 16:9, off by 0.05%.

Dimensions from the file

Width and height are read from the file header. That is why the size is detected even for HEIC shots from an iPhone, TIFF, and PSD, formats the browser does not open. If the shot is rotated by an EXIF tag, the size is taken in the form the browser will show it. For an SVG with a single viewBox, the proportion comes from it.

Crop or add borders

When cropping, one side stays the same and the excess on the other is trimmed evenly from both edges. Borders are added to the side that falls short, so the whole picture is kept. When an exact ratio does not come out in whole pixels, we show the difference and the nearest size where the ratio is exact.

Rate this tool

Help us get better

Other tools