When you need this conversion
You’ve inherited CSS written in viewport units, or you’re checking how a fluid value behaves on real devices. Converting vw to pixels at a few widths shows whether a heading is still readable on a phone and not absurd on a 4K monitor.
Check the extremes
Always test a vw value at both ends of your audience’s screens:
- 3vw: 11.25 px at 375 px, 43.2 px at 1440 px, 57.6 px at 1920 px
- 10vw: 37.5 px at 375 px, 144 px at 1440 px
If either end looks wrong, wrap the value in clamp(min, preferred, max) so it can’t go below or above sensible limits.
vw, svw and dvw
Modern CSS adds small (svw, svh), large (lvw, lvh) and dynamic (dvw, dvh) viewport units. On phones, 100vh is taller than the visible area when the address bar is showing; 100svh fixes that. For widths the difference is rarely visible, so plain vw is usually fine.
Common mistakes
Designing only at one width. A value that works at 1440 px can be unreadable at 375 px.
Using vw where % would do. Percentages are relative to the parent, not the window, which is usually what a layout needs.
For the reverse, see pixels to vw.