🍋
Menu
🍋 Developer Tools

CSS Unit Converter

Convert between px, rem, em, pt, %, vw, and vh

Free Browser-only No sign-up Popular
chars words sentences lines

Conversion Settings

Results

Result

About CSS Unit Converter

Convert CSS units between px, rem, em, pt, percentage, vw, and vh. Set your base font size and viewport dimensions for accurate conversions across all CSS length units.

How It Works

Enter a CSS value with its unit (e.g., '16px' or '1.5rem'). The tool converts it to all other supported units using your configured base font size and viewport dimensions.

Step by Step

  1. 1 Enter a CSS value with unit (e.g., '16px', '1rem', '12pt')
  2. 2 Set base font size for rem/em calculations (default: 16px)
  3. 3 Set viewport width/height for vw/vh calculations
  4. 4 See all equivalent values across 7 CSS units

Tips

  • Default browser font size is 16px (1rem = 16px)
  • Use rem for responsive typography, px for fixed elements
  • vw/vh are relative to the viewport, useful for full-screen layouts
  • pt is mainly used for print stylesheets (1pt ≈ 1.333px)

Frequently Asked Questions

What's the difference between rem and em?
rem is relative to the root element font size. em is relative to the parent element font size. This tool uses the base font size for both.
How are percentage values calculated?
Percentage is calculated relative to the base font size, similar to em units.