devShakib

Loading devShakib…

Aspect Ratio

Solve the missing width or height for a target ratio. Free, runs entirely in your browser — no signup, and nothing you paste in is uploaded.

Solving for a missing dimension is one multiplication, but the reason to be precise about it is layout shift. Giving a media element its ratio up front lets the browser reserve the right space before the file arrives, so the page does not jump when it loads — which is directly what Cumulative Layout Shift measures.

The ratios worth knowing are few: 16:9 for video, 4:3 for older photography and many screenshots, 1:1 for avatars and social tiles, and 1.91:1 for Open Graph cards, which is why 1200×630 is the size everyone uses.