Skip to content
M2TOOLKIT

Developer · free tool

CSS Units Converter

Convert between every CSS length unit at once.

Use it as often as you like — it's free, with no sign-up and no limits.

  • Developer
  • Free
  • No sign-up
  • Nothing is sent or stored
  • Updated
px
px
px
px
px
  • 24px
  • 1.5rem
  • 1.5em
  • 2.5%
  • 1.6667vw
  • 2.6667vh
  • 18pt
  • 1.5pc
  • 0.25in
  • 0.635cm
  • 6.35mm
  • 25.4Q

Fluid size idea

clamp(1.2rem, 1.6667vw, 1.5rem)

Grows with the viewport, never smaller than 80% or larger than this size.

CSS uses 96 px per inch, so 1pt = 1.333px and 1cm = 37.8px on screen — physical size varies by display.

The calculation happens instantly in your browser. The numbers you enter are not sent to our servers or saved.

How to use the CSS Units Converter

  1. Enter a value and its unit.
  2. Set your root font size, parent size and viewport if they differ from the defaults.
  3. Copy the value in any other unit.

What does this tool do?

Using rem for type and spacing respects users' browser font settings, which is better for accessibility than fixed pixels. The default root size is 16px, so 24px = 1.5rem. Physical units like cm and pt use CSS's fixed 96 pixels per inch, so they are only accurate in print.

Why use it?

  • All 12 units at once.
  • Custom base sizes.
  • clamp() idea included.

Use cases

  • Convert a design's pixel values to rem.
  • Work out viewport units for full-screen layouts.
  • Set print styles in pt or cm.

With a 16 px root and a 1440 px wide viewport

Common conversions:

ValueEquals
24px1.5rem
12pt16px
1in96px
1cm≈ 37.8px
50vw720px

Common mistakes

  • Using em for spacing deep in nested elements, where sizes compound.
  • Assuming 1cm on screen is a real centimetre.
  • Hard-coding px font sizes, which ignore users' settings.

Privacy

The calculation happens instantly in your browser. The numbers you enter are not sent to our servers or saved. There's no account to create and nothing to install.

Frequently asked questions

rem or em?

rem is relative to the root font size, so it's predictable. em is relative to the parent's font size.

Why does 100vh cause scroll on phones?

Mobile browser toolbars change the visible height; dvh or svh units handle this.

Is 1rem always 16px?

Only by default. Users and stylesheets can change the root size.

Content last updated . See how M2Toolkit works.

Other tools people use alongside the css units converter.