PX to VH Converter

Convert pixels to viewport-height units. 1vh = 1% of the viewport height, so on a 1080 px tall screen 1vh = 10.8 px.

⇅
Rounding precision (max 15):

Popular Conversions

On a 1080 px tall screen: 100px = 9.259vh, 540px = 50vh. On an 844 px tall phone: 100px = 11.848vh. The converter above starts with your own window height.

PX to VH Conversion Table

VH values for common pixel sizes at four typical viewport heights.

Pixels (px) Small phone (667px) Phone (844px) Laptop (768px) Desktop (1080px)
10px1.499vh1.185vh1.302vh0.926vh
20px2.999vh2.37vh2.604vh1.852vh
40px5.997vh4.739vh5.208vh3.704vh
50px7.496vh5.924vh6.51vh4.63vh
60px8.996vh7.109vh7.813vh5.556vh
80px11.994vh9.479vh10.417vh7.407vh
100px14.993vh11.848vh13.021vh9.259vh
120px17.991vh14.218vh15.625vh11.111vh
150px22.489vh17.773vh19.531vh13.889vh
200px29.985vh23.697vh26.042vh18.519vh
250px37.481vh29.621vh32.552vh23.148vh
300px44.978vh35.545vh39.063vh27.778vh
400px59.97vh47.393vh52.083vh37.037vh
500px74.963vh59.242vh65.104vh46.296vh
600px89.955vh71.09vh78.125vh55.556vh
700px104.948vh82.938vh91.146vh64.815vh
800px119.94vh94.787vh104.167vh74.074vh

VH on Phones: Use dvh, svh or lvh

On mobile browsers the address bar appears and disappears while scrolling, so the visible height keeps changing. Classic 100vh uses the largest height, which can hide the bottom of a full-screen section. Modern browsers add three units:

  • svh — the small viewport height, with the browser bars showing.
  • lvh — the large viewport height, with the bars hidden.
  • dvh — the dynamic height, which follows the bars as they move.

For a hero section that should exactly fill the screen, use min-height: 100dvh.

How to Convert PX to VH

vh = px ÷ viewport height × 100

Example: 300 px on an 844 px tall screen is 300 ÷ 844 × 100 = 35.545vh.

Frequently Asked Questions (FAQs)

How do I convert px to vh?

Divide the pixel value by the viewport height and multiply by 100. On a 1080 px tall screen, 100 px = 9.259vh.

Why is 100vh too tall on my phone?

100vh uses the height with the browser bars hidden. Use 100dvh or 100svh to fit the space that is actually visible.

What is the difference between vh and dvh?

vh is fixed to the largest viewport height. dvh changes as mobile browser bars show and hide, so it always matches the visible area.

Which viewport height should I use?

Use the height of the screen you are designing for. The converter fills in your current window height automatically.

Does EachConvert store my data?

No. All conversions happen entirely in your browser. The values you enter are never sent to our server or saved.