CSS Unit Converter
Convert between px, em, rem, points, percent and inches at once — enter one value and see every CSS unit.
Equivalent in every unit
| Unit | Value |
|---|
Browsers default to 16px. Use 10 if your CSS sets html { font-size: 62.5% }.
About this conversion
The same value at other root sizes
| Root size | Result |
|---|
What It Does
This is the whole family on one page: type a value in any CSS unit and see it in all six at once. CSS units split into two groups — px, pt and inches are absolute and fixed relative to each other, while em, rem and percent depend on a font size. The converter resolves everything through pixels using the root or parent size you set, and lists the caveats that apply to your particular value, such as em compounding through nesting or rem and percent measuring against different elements.
When to Use It
- You are converting a design handed over in any CSS unit into a stylesheet that uses every other unit for accessibility.
- You inherited a codebase that mixes units and you need the unit equivalent of an existing unit value.
- You want to check what a unit value becomes when the user changes their browser's default font size.
- You are writing a design-token scale and need the same step expressed in both units.
Worked Examples
16
The browser default: 16px is 1rem, 1em, 100%, 12pt and one sixth of an inch.
24
A heading step: 24px is 1.5rem, 150% and 18pt.
1
Change the unit to inches and 1in shows as 96px and 72pt — the two definitions the absolute units are built from.
Features
How to Use
1. Type a value and pick the unit you are starting from — or just type "1.5rem" and the unit is detected. 2. Set the root or parent font size if it is not the 16px default. 3. Read every equivalent at once, and copy the one you need.
Common Mistakes
- Assuming the conversion is fixed. relative units depend on a font size; absolute units do not — the same unit value converts differently depending on that size.
- Confusing em with rem. `em` is relative to the *parent* element's font size and therefore compounds when nested; `rem` is always relative to the root element and does not.
- Setting a px font size on the root element. That overrides the user's browser font-size preference, which defeats the accessibility reason for using relative units at all.
- Rounding too early. Keep the fraction (1.375rem, not 1.4rem) — the browser resolves sub-pixel values fine and the rounding error compounds across a scale.
Frequently Asked Questions
The conversion runs entirely in your browser. Nothing is uploaded and nothing is stored.