Conversion Form

VW
VH

About the Unit

VW (Viewport Width): VW is a relative unit based on the width of the viewport (the visible area of the page in the browser). 1vw corresponds to 1% of the viewport width. This unit is extremely useful when you want to create designs that automatically adjust to the screen width, especially in responsive layouts. Using vw units allows you to set element widths that adapt fluidly to the screen size without the need for complicated media queries. For example, if you set an element's width to 50vw, it will occupy half of the screen width, regardless of the screen size or device resolution. This flexibility makes VW ideal for layouts that need to be adaptable, such as websites that work well on both mobile devices and desktops.

Pro Tip: vwvh

Use vw for layouts that adapt to screen size and vh for viewport-relative full-height sections.

Quick Reference: Unit Conversion by Tens

VWVH
10vw17.777778vh
20vw35.555556vh
30vw53.333333vh
40vw71.111111vh
50vw88.888889vh
60vw106.666667vh
70vw124.444444vh
80vw142.222222vh
90vw160vh
100vw177.777778vh
110vw195.555556vh
120vw213.333333vh
130vw231.111111vh
140vw248.888889vh
150vw266.666667vh
160vw284.444444vh
170vw302.222222vh
180vw320vh
190vw337.777778vh
200vw355.555556vh
210vw373.333333vh
220vw391.111111vh
230vw408.888889vh
240vw426.666667vh
250vw444.444444vh

Live Unit Preview

See how different CSS units affect the size of the box below:

10px

10rem

10em

10%

10vw

10vh

Common Mistake

Use vw for full-width layouts, vh for full-height sections.

Real Code Example

/* Mobile-first card with vw → vh */
.card {
  padding: 0vw;     /* undefinedvh */
  font-size: 1.5rem;
  width: min(90vw, 40ch);
}

Frequently Asked Questions About VW

When should I use vw instead of vw?

Use vw for elements that scale with screen width.

How many vw is 1vw?

1vw = 1% of the viewport width.

Is vw affected by screen size?

Yes, it changes with browser width.

Is vw good for fonts?

Sometimes, but rem is more consistent.

Keyboard Shortcuts

  • Ctrl + C: Convert
  • Ctrl + I: Invert units
  • Esc: Reset values

More popular conversions