Aspect Ratio
Calculate and maintain aspect ratios for images, videos and screens.
① Enter width and height ② Or pick a preset ratio ③ Copy the CSS
aspect-ratio: 16 / 9; padding-top: 56.2500%; /* legacy fallback */ width: 1920px; height: 1080px;
What is aspect ratio and why does it matter?
The aspect ratio is the proportional relationship between an element's width and height, expressed as W:H — for example 16:9, 4:3, 1:1, or 9:16. It is fundamental to video production, photography, responsive web design, and UI layout. Modern CSS enforces ratios with the aspect-ratio property (e.g., aspect-ratio: 16 / 9), replacing the old padding-top hack (padding-top: 56.25%). Common use cases: YouTube thumbnails (1280×720, 16:9), Instagram posts (1080×1080, 1:1), TikTok and Stories (1080×1920, 9:16), Open Graph images (1200×630, ~1.91:1), LinkedIn banners (1200×627). This calculator covers standard presets, social media presets, custom ratio input, locked proportions, and instant CSS output.