πŸ“
πŸ–ΌοΈ

Calculate Image Dimensions for Web

Ensure images fit their containers perfectly β€” find the right width and height for any layout.

Nid oes angen mewngofnodi
Simplified ratio16:9
Decimal ratio1.7778:1
Named ratio16:9
Megapixels2.07 MP
16:9

Common dimensions

Web tips

πŸ–ΌοΈ

If your CSS container is 800px wide and you want a 16:9 image, calculate the height: 800 / 16 Γ— 9 = 450px. This tool does that for you.

πŸ’‘

Using aspect-ratio CSS? The tool shows the simplified ratio (e.g. 8:5) which you can use directly in aspect-ratio: 8/5 in CSS.

πŸ“

For responsive images, calculate at your largest breakpoint, then CSS handles the scaling. The ratio stays the same at all widths.

πŸš€

Always specify width and height attributes on <img> tags (matching the image's natural ratio) to prevent Cumulative Layout Shift (CLS).

Sut Mae'n Gweithio

1
Ewch i mewn
Enter your data into the tool above. Everything stays local to your browser.
2
Proses
The tool processes your data instantly in your browser using JavaScript. No server, no waiting.
3
Lawrlwythwch
Get your result instantly. Nothing is stored after you leave the page β€” complete privacy.

Pam defnyddio ein un ni?

βœ“Hollol rhad ac am ddim - dim costau cudd, byth
βœ“Nid oes angen cyfrif, e-bost na mewngofnodi
βœ“Nid yw ffeiliau byth yn gadael eich dyfais
βœ“Dim cyfyngiadau maint ffeil o gwbl
βœ“Dim dyfrnodau ar unrhyw allbwn

Also check out…

Cwestiynau Cyffredin