vh to px
A converter that calculates the px from a vh for a given breakpoint to measure the pixels
Hot Keys
Calculate and copy the result of calculation.
Calculate the result.
Copy the result of calculation.
Reverse the converter to "PX to VH".
Focus the "Viewport Height" input.
Focus the "VH Unit" input.
FAQ
How to convert VH to PX?
To convert vh to px, you should know total viewport height for example 1000px Then, just apply formula: vh * viewport total height / 100 For example, with a viewport of 1000px, 20vh will be converted to: 20 * 1000 / 100 = 200px
What is the VH to PX formula?
vh * viewport total height / 100
What is vh unit? (Viewport Height)
Used in responsive design, Viewport Height (VH) is a unit relative to web page display area called viewport. 1vh corresponds to 1% of display. So, to make an element full height, you should use 100vh. You can also use decimal values. Please note that, depending on browsers, decimal precision can change.
What is px unit? (Pixels)
Pixel unit is the theorical smallest dot displayed on a computer screen. Nowadays, pixel unit can differ between physical resolution and logical resolution. This difference is called device pixel ratio or DPR: Logical resolution = physical resolution / device pixel ratio. So, a screen with 1024x768 physical resolution with a DPR of 2 will have a 512x384 logical resolution.
VH to PX Conversion Table if viewport height size is 1080px
vh | px |
---|---|
1vh | 10.8px |
2vh | 21.6px |
3vh | 32.4px |
4vh | 43.2px |
5vh | 54px |
6vh | 64.8px |
7vh | 75.6px |
8vh | 86.4px |
9vh | 97.2px |
10vh | 108px |
11vh | 118.8px |
12vh | 129.6px |
13vh | 140.4px |
14vh | 151.2px |
15vh | 162px |
16vh | 172.8px |
17vh | 183.6px |
18vh | 194.4px |
19vh | 205.2px |
20vh | 216px |
21vh | 226.8px |
22vh | 237.6px |
23vh | 248.4px |
24vh | 259.2px |
25vh | 270px |