Skip to content
Aback Tools Logo

Viewport Unit Converter

Convert any CSS viewport unit (vw, vh, vmin, vmax, dvw, dvh, svw, svh, lvw, lvh) to px, rem, em, pt, percentages, and physical units instantly. Set custom viewport dimensions, choose from 11 device presets, and see all conversions in one scrollable table. Fully private, 100% free, and no signup required.

Viewport Unit Converter
Convert between CSS viewport units (vw, vh, vmin, vmax, dvw, dvh, svw, svh, lvw, lvh) and pixels, rem, em, pt, percentages, and physical units. Set custom viewport dimensions or use device presets. All calculations run in your browser.
Conversion Input

Common CSS values

Result
16.0000vw307.2000px
Viewport Settings

Device Presets

px
px
All Unit Conversions16vw @ 1920×1080
UnitValue
vh
28.4444vh
vmin
28.4444vmin
vmax
16.0000vmax
dvw
16.0000dvw
dvh
28.4444dvh
dvmin
28.4444dvmin
dvmax
16.0000dvmax
svw
16.0000svw
svh
28.4444svh
svmin
28.4444svmin
svmax
16.0000svmax
lvw
16.0000lvw
lvh
28.4444lvh
lvmin
28.4444lvmin
lvmax
16.0000lvmax
vi
16.0000vi
vb
28.4444vb
px
307.2000px
rem
19.2000rem
em
19.2000em
pt
230.4000pt
%
16.0000%
cm
8.1280cm
mm
81.2800mm
in
3.2000in
pc
19.2000pc
q
325.1200q
ch
38.4000ch
ex
38.4000ex

Dynamic viewport units (dvw, dvh) account for browser chrome (address bar, toolbars) that appears and disappears on scroll. Small viewport units (svw, svh) use the smallest possible viewport size. Large viewport units (lvw, lvh) use the largest possible. In this tool, dynamic/small/large units are approximated using the viewport dimensions you provide, since actual browser chrome varies by device and browser.

Why Use Our Viewport Unit Converter?

Instant Conversion Between All Viewport Units

The Viewport Unit Converter instantly converts values between vw, vh, vmin, vmax, dvw, dvh, svw, svh, lvw, lvh, and more - plus px, rem, em, pt, percentages, and physical units. Every keystroke updates all results in real time with no button to press.

Real Device Presets & Custom Viewport

Choose from 11 device presets - iPhone, iPad, Pixel, Galaxy, and multiple desktop sizes - or enter custom viewport dimensions. See exactly how your CSS values behave at different breakpoints without switching browser DevTools.

All Units in One View

See every unit conversion at once in a scrollable results table. Each row shows the unit name and converted value with a one-click copy button. The primary result shows prominently with the current viewport dimensions context.

CSS Value Quick Presets

Quickly select from 17 common CSS values (1, 2, 4, 8, 12, 16, 20, 24, 32, 40, 48, 56, 64, 72, 80, 96, 100) to instantly see what the equivalent is in every viewport unit - perfect for responsive design workflows.

Common Use Cases for Viewport Unit Converter

Responsive CSS Development

Front-end developers use the Viewport Unit Converter to translate design mockup pixel values into responsive viewport units (vw, vh, vmin, vmax). Convert font sizes, spacing, and element dimensions across different viewport sizes without manual calculation.

Mobile-First Responsive Design

Mobile designers use the Viewport Unit Converter to ensure CSS values work across phone sizes. Test how a 5vw font size renders on an iPhone SE (375px) vs a Pixel 7 (412px) and adjust accordingly for consistent typography.

Tablet & Breakpoint Planning

Designers and developers use the Viewport Unit Converter to plan responsive breakpoints. Understand how viewport units behave on iPad (744-834px) and tablet sizes to ensure smooth scaling between mobile and desktop layouts.

Design-to-Code Handoff

Designers use the Viewport Unit Converter during design-to-development handoff. Convert Figma pixel values to equivalent viewport units at the target viewport size, providing developers with exact CSS values that match the design intent.

Large Screen & Desktop Layouts

Desktop developers use the Viewport Unit Converter to test CSS values at common desktop sizes - 1024px, 1280px, 1366px, 1440px, and 1920px. Ensure that vw-based layouts scale correctly from standard laptops to ultra-wide monitors.

Font Size & Spacing Systems

Design system maintainers use the Viewport Unit Converter to build responsive type and spacing scales. Convert between rem (root-relative), vw (viewport-relative), and px (absolute) to create consistent design tokens that scale predictably.

Understanding CSS Viewport Units

What Are CSS Viewport Units?

CSS viewport units are relative length units that are calculated based on the size of the viewport - the visible area of a web page in the browser window. There are three categories of viewport units. The classic units (vw, vh, vmin, vmax) are based on the initial containing block. The newer units added in CSS Values Level 4 provide more precise control: dvw/dvh (dynamic - responds to browser chrome changes), svw/svh (small - uses smallest possible viewport), and lvw/lvh (large - uses largest possible viewport). Our Viewport Unit Converter lets you convert between all of these units and other CSS length units, helping you build responsive designs with confidence.

How Our Viewport Unit Converter Works

  1. Enter Your Value: Type a numeric value and select the source unit (e.g. 16 vw). Use the common CSS value presets to quickly test standard spacing values like 8, 16, 24, 32, 48, and 64.
  2. Set the Viewport Size: Choose a device preset (iPhone, iPad, desktop sizes) or enter custom viewport width and height. The root font size (for rem) and parent font size (for em) are also configurable. All conversions update instantly as you change any setting.
  3. Read the Results: The primary conversion (to pixels) is shown prominently, while the full results table displays the equivalent value in every supported unit - viewport units, font-relative units, physical units, percentages, and more. Copy individual values or all values at once with one click.

Viewport Unit Categories Explained

  • Classic Viewport Units (vw, vh, vmin, vmax): 1vw = 1% of viewport width, 1vh = 1% of viewport height, 1vmin = 1% of the smaller dimension (useful for ensuring elements fit in both orientations), and 1vmax = 1% of the larger dimension. These are based on the initial containing block and have excellent browser support.
  • Dynamic Viewport Units (dvw, dvh, dvmin, dvmax): These units respond to dynamic changes in the viewport size caused by browser chrome (address bar, toolbars) appearing or disappearing as the user scrolls. On mobile browsers, 100dvh gives you the actual visible height including dynamic changes, solving the classic "100vh includes the address bar" problem.
  • Small & Large Viewport Units (svw, svh, lvw, lvh): Small viewport units use the smallest possible viewport size (with browser chrome fully visible). Large viewport units use the largest possible viewport size (with browser chrome hidden). Using 100svh ensures your element fits even with the address bar showing, while 100lvh fills the full screen once the user scrolls.
  • Physical & Font-Relative Units: px (CSS pixels), pt (points), cm, mm, in (inches), pc (picas), q (quarter-millimeters), rem (root em), em (parent em), ch (character width of "0"), and ex (x-height of "x"). The Viewport Unit Converter handles all of these alongside viewport units for complete CSS length conversion.

Tips for Using Viewport Units

Viewport units are powerful but require careful usage:

  • Typography: Use clamp() with vw units for responsive font sizes that stay within min/max bounds - e.g., font-size: clamp(16px, 2vw, 24px). Use the converter to find the right vw value for your target pixel size.
  • Full-height elements: On mobile, height: 100vh can be larger than the visible area due to browser chrome. Consider using 100dvh (dynamic) or 100lvh (large) for full-screen layouts.
  • Avoid overuse in body text: Viewport units on body text can cause accessibility issues because users cannot resize text that uses vw units in some browsers. Use rem for body text and reserve vw for headings and large elements.
  • Test at multiple breakpoints: A value that works at 1440px may be too large at 375px or too small at 2560px. Use the Viewport Unit Converter with different device presets to verify your values across the full range of viewport sizes.

Frequently Asked Questions About Viewport Unit Converter

A viewport unit converter translates values between CSS viewport units (vw, vh, vmin, vmax, dvw, dvh, svw, svh, lvw, lvh) and other CSS length units like pixels, rem, em, pt, and percentages. Given a numeric value and a source unit, it calculates the equivalent value in every other unit based on the viewport dimensions you provide. All calculations run locally in your browser.

All four represent 1% of viewport width, but based on different viewport definitions: vw uses the initial containing block (standard viewport), dvw (dynamic) responds to browser chrome changes like the address bar appearing/disappearing, svw (small) uses the smallest possible viewport size with chrome fully visible, and lvw (large) uses the largest possible viewport size with chrome hidden. In practice, dvw and lvw are useful for mobile layouts where the address bar size affects the visible area.

To convert vw to pixels, multiply the vw value by the viewport width and divide by 100. For example, 5vw at a 1440px viewport = 5 × 1440 / 100 = 72px. The Viewport Unit Converter does this automatically - just enter your vw value, select your viewport size (or choose a device preset), and read the pixel equivalent instantly.

Use device presets that match your target audience: iPhone (390×844 for iPhone 14 Pro, 375×667 for iPhone SE), Android (412×915 for Pixel 7, 360×780 for Galaxy S23), iPad (834×1194 for iPad Pro 11"), and common desktop sizes (1920×1080, 1440×900, 1366×768, 1280×720). For responsive design, test your values at the smallest and largest viewport sizes you support.

rem (root em) is relative to the font-size of the root element (<html>), which defaults to 16px in most browsers. em is relative to the font-size of the parent element, which can vary depending on the element's position in the DOM tree. The Viewport Unit Converter lets you set custom values for both the root font size (for rem) and parent font size (for em) to match your design system.

Yes. The Viewport Unit Converter supports physical units including px (CSS pixels), pt (points - 1pt = 1/72 inch), cm (centimeters), mm (millimeters), in (inches), pc (picas - 1pc = 12pt), and q (quarter-millimeters - 1q = 0.25mm). All physical conversions use the CSS standard of 96 DPI, so 1 inch always equals 96 CSS pixels.

In this tool, dynamic viewport units are approximated using the viewport dimensions you provide because the actual "dynamic" viewport size depends on the specific browser, device, and browser chrome state. On a real device, 100dvh might be 10-15% smaller than 100vh when the address bar is visible. The tool shows the mathematical conversion based on your viewport dimensions - actual values on devices will vary.

Yes. The Viewport Unit Converter is 100% free with no signup required, no premium features, no usage limits, and no ads blocking the interface. Convert unlimited values across all viewport units as many times as you need.