REM to VW/VH Converter

Convert rem units to viewport units (vw/vh) instantly for responsive web design

About REM to VW/VH Conversion

This tool converts REM units (relative to root font size) to viewport units (vw/vh) that are relative to the browser viewport size. 1vw = 1% of viewport width, 1vh = 1% of viewport height.

How to Use This Tool

  1. Enter the REM value you want to convert
  2. Select whether to convert to vw (viewport width) or vh (viewport height)
  3. Specify your root font size in pixels (default is 16px)
  4. Enter the viewport size in pixels (defaults shown based on selection)
  5. Click "Convert to VW/VH" to get the equivalent value
  6. Copy the result and use it in your CSS

The Conversion Formula

The formula to convert REM to viewport units is:

vw = (rem × root-font-size) / viewport-width × 100vw
vh = (rem × root-font-size) / viewport-height × 100vh

For example, to convert 2rem to vw when root is 16px and viewport is 1920px:

(2 × 16) / 1920 × 100vw = 1.66667vw

Why Convert REM to Viewport Units?

Key Differences Between REM and Viewport Units

Best Practices