DevToolPal
EN

CSS units

px to vw Converter

Convert pixels (px) to viewport width units (vw). 1 px = 0.05208333333 vw, and 1 vw = 19.2 px.

1 px = 0.05208333333 vw

Open in PX to REM Converter

Formula

vw = px × 100 ÷ 1920

How to convert

To convert pixels to viewport width units, use the formula vw = px × 100 ÷ 1920. For example, 32 px = 1.666666667 vw.

Conversion table

px vw
1 px 0.05208333333 vw
2 px 0.1041666667 vw
4 px 0.2083333333 vw
8 px 0.4166666667 vw
10 px 0.5208333333 vw
12 px 0.625 vw
14 px 0.7291666667 vw
16 px 0.8333333333 vw
18 px 0.9375 vw
20 px 1.041666667 vw
24 px 1.25 vw
32 px 1.666666667 vw
48 px 2.5 vw
64 px 3.333333333 vw

The table assumes a viewport width of 1920px. Change the settings in the converter above to match your project.

About these units

Browsers turn every CSS length into pixels. rem is relative to the root font size and em to the parent element's font size; both are 16px in every major browser unless the page or the user changes it. 1pt is 1/72 inch and 1px is 1/96 inch, so 1pt = 1.333px. vw is 1% of the viewport width, so its pixel size depends on the screen.

FAQ

› How do I convert px to vw?

1 px = 0.05208333333 vw. To convert, use the formula vw = px × 100 ÷ 1920: 32 px = 1.666666667 vw.

› What is 1 vw in px?

1 vw = 19.2 px. The reverse formula is px = vw × 1920 ÷ 100.

› Why use rem instead of px?

rem sizes follow the user's browser font size setting, which helps accessibility, and changing one root value resizes the whole layout consistently.

› What is the difference between rem and em?

rem always uses the root (html) font size. em uses the font size of the element's parent, so nested em values compound.