Tools
Enter a width and height to get the simplified aspect ratio, or lock a ratio such as 16:9 and work out the missing height or width. The CSS aspect-ratio and padding-top hacks are generated for you.
Options
I want to
Result
16:9
1.7778 as a decimal · height is 56.25% of width
Preview
16:9
CSS
aspect-ratio: 16 / 9;
/* Fallback for very old browsers */
.wrapper {
position: relative;
padding-top: 56.25%;
}Frequently asked questions
- How do I work out an aspect ratio?
- Divide both the width and the height by their greatest common divisor. 1920 and 1080 share 120, which gives 16:9.
- How do I keep an aspect ratio in CSS?
- Use the aspect-ratio property, for example aspect-ratio: 16 / 9, and set only the width. For very old browsers the fallback is a padding-top percentage equal to height / width on a wrapper.
- What ratios do social networks use?
- Open Graph share images are 1.91:1 (1200 x 630). Instagram posts are 1:1 or 4:5. Stories, Reels and TikTok are 9:16. YouTube is 16:9.
quick question
Was this tool helpful?