Pixel Converter

PX to VH Converter

Convert pixels to vh. 1vh equals 1% of the viewport height, so the result depends on the viewport size you set.

1vh equals 1% of this height.

Result

1.4815vh

Formula

vh = (px ÷ viewport height) × 100

Conversion table

px → vh at viewport height (px) = 1080.

pxvh
10px0.9259vh
20px1.8519vh
40px3.7037vh
54px5vh
108px10vh
216px20vh
270px25vh
324px30vh
432px40vh
540px50vh
648px60vh
756px70vh
864px80vh
972px90vh
1080px100vh

About the PX to VH conversion

The vh unit is relative to the viewport: 1vh equals 1% of the browser window’s height. It is used to size elements as a proportion of the screen — full-height hero sections, for example, use height: 100vh.

To convert px to vh you divide the pixel value by the viewport height and multiply by 100. On a 1080px-tall viewport, 108px is 10vh and 540px is 50vh. Change the viewport height field to match the device you are targeting.

Because vh depends on the viewport, the same pixel value maps to different vh values across devices — this converter makes that relationship explicit for any viewport you choose.

Related converters

PX to VH Converter FAQs

Divide the pixel value by the viewport height, then multiply by 100. On a 1080px-tall viewport, 540px = (540/1080)×100 = 50vh.
1vh is 1% of the current viewport height. On an 800px-tall window, 1vh = 8px; on a 1080px window, 1vh = 10.8px.
Use the height of the device or window you are designing for. This tool defaults to 1080px (a common desktop height); change it to match a phone, tablet, or specific breakpoint.
On many mobile browsers 100vh historically included the area behind dynamic toolbars, which caused jumps. Newer units (svh, lvh, dvh) address this, but the px↔vh math here uses the viewport height you supply.