DevBento logoDevBento
Tools/CSS Units Converter

CSS Units Converter

Convert between CSS units instantly: px, rem, em, vw, vh, pt, cm, mm, and more. Set your base font size and viewport dimensions for accurate conversions.

Γ·base
Viewport settings
Enter a value above to convert between CSS units
Related Conversions
Px to Rem Converter
Convert pixels to rem units instantly with this free CSS converter. Adjust the base font size and watch the px to rem conversion update in real time now.
Rem to Px Converter
Convert rem to pixels instantly with this free CSS rem to px converter. Set your base font size for accurate results. Includes common rem-to-px values.
Related Tools
rgbColor Converter + Palette
Convert color unit values
πŸ“Unit Converter
Convert between length, weight, temperature, speed, area, volume, data, and time units instantly. Metric, imperial, and more. No server, no signup.

CSS Units Converter

Convert between any CSS units with accurate, context-aware calculations. Enter a value, pick a source unit, and see the equivalent in all 14 CSS unit types instantly.

Supported Units

Unit Type Description
px Absolute Pixel, the base unit for screen display
pt Absolute Point (1pt = 1/72 inch, 1pt β‰ˆ 1.333px)
pc Absolute Pica (1pc = 12pt)
cm Absolute Centimeter
mm Absolute Millimeter
in Absolute Inch (1in = 96px)
rem Relative Root em, relative to root font size
em Relative Em, relative to parent font size
vw Viewport 1% of viewport width
vh Viewport 1% of viewport height
vmin Viewport 1% of smaller viewport dimension
vmax Viewport 1% of larger viewport dimension
ex Font Approximate x-height (β‰ˆ 0.5em)
ch Font Approximate character width (β‰ˆ 0.6em)

How to Use

  1. Enter a numeric value in the input field
  2. Select the source unit from the dropdown
  3. See the converted value in every other unit
  4. Adjust base font size or viewport dimensions in Context Settings for accurate relative conversions
  5. Click the copy icon next to any result to copy it

Common Use Cases

Responsive Design with rem

When building responsive layouts, converting between px and rem ensures your spacing scales correctly with user preferences. The default base font size is 16px, matching most browsers.

Media Query Viewport Units

Convert pixel breakpoints to viewport units for fluid responsive designs. A 1440px container equals 100vw at that viewport width.

Cross-Browser Font Sizing

Different browsers have different default font sizes. Using rem instead of px ensures consistent rendering even when users adjust their browser settings.

Converting screen units (px) to print units (pt, cm, in) helps create accurate print stylesheets.

πŸ”’

Nothing you paste leaves this tab. Every tool runs entirely in your browser β€” no upload, no server, no account.

Β© 2026 devbento.dev Β· built local-first