100 vh equals the height of the viewport in pixels. For example, if your screen height is 900 pixels, then 100 vh = 900 px.
The unit “vh” stands for viewport height, meaning 1 vh is 1% of the viewport’s height. So, converting 100 vh to pixels means calculating the full height of the screen or browser window in pixel units.
Conversion Tool
Result in px:
Conversion Formula
The formula to convert any vh value to pixels is:
pixels = (viewport height in pixels) × (vh value) ÷ 100
Because 1 vh equals 1% of the viewport height, multiplying the viewport height by the vh value and then dividing by 100 gives the pixel equivalent.
For example, if the viewport height is 900px and you want to convert 100 vh:
- Multiply 900px by 100 = 90000
- Divide 90000 by 100 = 900px
- So, 100 vh = 900 px
Conversion Example
- Convert 50 vh to px with viewport height 800px:
- Multiply 800 by 50 = 40000
- Divide 40000 by 100 = 400 px
- Result: 50 vh = 400 px
- Convert 75 vh to px with viewport height 1080px:
- Multiply 1080 by 75 = 81000
- Divide 81000 by 100 = 810 px
- Result: 75 vh = 810 px
- Convert 120 vh to px with viewport height 720px:
- Multiply 720 by 120 = 86400
- Divide 86400 by 100 = 864 px
- Result: 120 vh = 864 px
Conversion Chart
The table below shows vh values between 75 and 125, converted to pixels assuming the viewport height is 900 pixels.
vh Value | Pixels (px) |
---|---|
75.0 | 675.0 |
80.0 | 720.0 |
85.0 | 765.0 |
90.0 | 810.0 |
95.0 | 855.0 |
100.0 | 900.0 |
105.0 | 945.0 |
110.0 | 990.0 |
115.0 | 1035.0 |
120.0 | 1080.0 |
125.0 | 1125.0 |
To use the chart, find the vh value on the left column, then read the corresponding pixel value on the right. This helps quick reference without calculation.
Related Conversion Questions
- How many pixels equals 100 vh on a 1920×1080 screen?
- What is the pixel height of 100 vh on a mobile device?
- Does 100 vh change when resizing the browser window?
- Can 100 vh be more than the screen height in pixels?
- How do I convert 100 vh to pixels using CSS or JavaScript?
- What happens if viewport height changes after page load, does 100 vh update?
- Is 100 vh always the same as window.innerHeight in pixels?
Conversion Definitions
vh: The unit vh means viewport height, representing 1% of the current height of the browser window or screen. When you use 100 vh, it equals the full height of the viewport. It allows responsive sizing relative to screen height, useful for layouts and styling.
px: Pixels (px) are the basic unit of measurement for digital screens, representing one dot on the display. The size of a pixel depends on screen resolution and density. Pixels are absolute units used to specify fixed dimensions in web design and graphics.
Conversion FAQs
Does the value of 100 vh change on different devices?
Yes, because 100 vh represents 100% of the viewport height, it changes depending on device screen size and browser window dimensions. A phone with a shorter screen will have a smaller pixel height for 100 vh compared to a desktop monitor.
Can 100 vh be larger than the visible screen area?
In some cases, browser UI like address bars or toolbars reduce visible viewport height. This means 100 vh might include areas hidden behind such elements, leading to unexpected scrolling or clipping in some browsers.
Why does 100 vh sometimes cause vertical scroll bars?
Because 100 vh covers the full viewport height, if combined with margins, paddings, or borders, total content height might exceed viewport, causing scroll bars. Adjustments or box-sizing can help prevent overflow.
Is there a difference between window.innerHeight and 100 vh?
Window.innerHeight returns the height of the viewport excluding browser interface, and usually matches 100 vh. However, some mobile browsers handle vh units differently, sometimes including or excluding UI elements, causing discrepancies.
How to convert vh to px dynamically in JavaScript?
You multiply the vh value by window.innerHeight and divide by 100. For example, pixels = (vh * window.innerHeight) / 100. This lets you get exact pixel values when viewport size changes.