What is CSS Unit Converter?
CSS supports several different units for sizing — absolute ones like px and pt, and relative ones like rem, em, vw, vh, and %. Relative units are essential for responsive, accessible design (rem in particular respects a user's browser font-size preference), but converting between them mentally is genuinely difficult, since the result depends on context: the root font size, the current element's font size, or the viewport dimensions.
This converter does that math for you: set your base font size, viewport dimensions, and the value you're converting from, and see the equivalent value in every other unit instantly — useful for translating a design mockup's pixel measurements into responsive rem/vw values, or double-checking what an existing CSS rule actually renders as on screen.
When to Use This Calculator
- When translating a designer's pixel-based spec into responsive rem or vw values for CSS
- When checking what a vw-based responsive font size actually renders as at a specific screen width
- When converting legacy pt-based print or email CSS to web-standard px or rem
- When auditing whether a design system's spacing scale lines up cleanly across different units
- When sanity-checking a CSS value during code review without opening browser dev tools
- When building accessible sites that need rem-based sizing to respect user font preferences
Steps:
- Enter the value you want to convert and select its starting unit.
- Set your base font size (defaults to the browser standard of 16px).
- For vw/vh conversions, enter your target viewport width and height.
- Read the equivalent value in every other unit instantly.
Formula
1rem = 1em = base font size (default 16px)
1pt = 96/72 px ≈ 1.333px
1vw = viewport width / 100
1vh = viewport height / 100
1% = reference value / 100
Use Cases
- Converting a designer's pixel-based Figma/Sketch spec into rem values for accessible CSS
- Checking what a vw-based responsive font size actually renders as at a specific screen width
- Translating legacy pt-based print or email CSS into web-standard px or rem
- Auditing whether a design system's spacing scale lines up cleanly across units
- Quickly sanity-checking a CSS value during code review without opening dev tools
Key Benefits
- Converts between all 7 common CSS units in one place
- Uses your actual base font size and viewport, not a fixed assumption
- Instant results as you type — no need to open browser dev tools
- Free, no sign-up, runs entirely in your browser
Pro Tips
- Prefer rem over em for font sizes to avoid unexpected compounding in nested components
- Use dvh/svh instead of vh for mobile full-screen layouts if your target browsers support it
- Keep a consistent base font size across your design system so rem conversions stay predictable
- When translating a pixel-perfect design, convert spacing to rem but keep border-widths and other fine details in px
Common Mistakes to Avoid
- Assuming 1rem always equals 16px, without checking if the root font size was changed
- Using vh for mobile full-height layouts without accounting for browser address bar behavior
- Nesting em-based font sizes and being surprised when they compound unexpectedly
- Mixing px and rem inconsistently within the same component, breaking accessibility scaling
Key Terms Explained
- Root font size: The font-size set on the html element, which all rem units are relative to
- Viewport: The visible area of a web page in the browser window
- Absolute unit: A unit like px or pt with a fixed real-world size, not relative to any context
- Relative unit: A unit like rem, em, vw, or % whose size depends on another value
Related Concepts
- Color Converter: Convert between HEX, RGB, and HSL color formats
- Length Converter: Convert between inches, centimeters, pixels, and more
- Unit Converter: Convert between various measurement units
- Aspect Ratio Calculator: Calculate and convert aspect ratios
- Data Converter: Convert between bytes, KB, MB, GB, and TB
Example
At a 16px base font size, 1.5rem converts to 24px. At a 1440px viewport width, 5vw converts to 72px.
Interpreting Your Results
The converter takes a value in one CSS unit and shows equivalent values in all others. The key variable is your base font size (default 16px), which determines the rem-to-px relationship. Since rem is relative to the root html element's font size, changing this base value will shift all rem equivalents proportionally.
For responsive units (vw, vh), enter your target viewport dimensions to see how the values translate at specific screen sizes. This is particularly useful for understanding whether a 5vw heading will be readable on a 320px mobile screen (16px) versus a 1440px desktop (72px). The converter helps you make informed decisions about which unit to use in each context.

