Convert PX to VH
Convert pixels to viewport height (vh) units. Set viewport height for precise results. Free CSS responsive unit calculator.
Formula: vh = (px ÷ viewport height) × 100
Quick example: 400px ÷ 900 × 100 = 44.44vh
Value
Unit
px
px
px
px
pxSource
16pxrem
1remem
1emvh
1.4815vhvw
0.8333vwVisual Preview
16px
About This Conversion
Viewport height (vh) units make elements scale relative to the browser window height. 1vh equals 1% of the viewport height. This is commonly used for full-screen hero sections (100vh), split-screen layouts (50vh), and vertical spacing that adapts to the device. Converting pixels to vh helps translate fixed designs into fluid, responsive layouts. Note that on mobile browsers, 100vh can be larger than the visible area due to the address bar — consider using dvh (dynamic viewport height) for mobile-first designs.
Frequently Asked Questions
How do I convert PX to VH?
Divide the pixel value by the viewport height, then multiply by 100. Formula: vh = (px / viewport height) × 100. Example: 450px on 900px viewport = 50vh.
Why does 100vh overflow on mobile?
Mobile browsers include the address bar in the viewport height calculation. The actual visible area is smaller. Use 100dvh (dynamic viewport height) to account for this, or use CSS's min-height: 100svh.
What viewport height should I use for conversion?
Common heights: 900px (desktop), 1024px (tablet portrait), 667px (mobile). Use your target device's viewport height.