CSS Unit Converter
CSS Unit Converter: free, instant and private. rem is predictable because it always chains to the root; em compounds through nesting, which is why a button inside a heading can surprise you.
How the CSS Unit Converter works
The CSS Unit Converter takes Value, From unit, Root font size (px), Parent font size for em/% (px) and returns the answer instantly — no button to hunt for, no page reload. rem is predictable because it always chains to the root; em compounds through nesting, which is why a button inside a heading can surprise you. For accessibility, size text in rem so it respects the user's browser zoom setting.
Enter your own numbers to replace the example values; the result panel updates as you type. Everything runs in this single page, so nothing you enter leaves your device.
Formula used
rem = px ÷ root size; em = px ÷ parent size; pt = px × 0.75; % = value ÷ parent × 100
| Symbol | Meaning |
|---|---|
| root size | the browser default 16 px unless your CSS resets it |
| parent size | em and % inherit from the containing element, not the root |
rem is predictable because it always chains to the root; em compounds through nesting, which is why a button inside a heading can surprise you. For accessibility, size text in rem so it respects the user's browser zoom setting.
Inputs used: Value, From unit, Root font size (px), Parent font size for em/% (px).
Worked example
Take the default example — from unit set to px, root font size (px) of 16, parent font size for em/% (px) of 16:
- Pixels: 0
- Rem: 0
- Em: 0
- Points: 0
- Percent: 0
Frequently asked questions
- What formula does the CSS Unit Converter use?
- It uses rem = px ÷ root size; em = px ÷ parent size; pt = px × 0.75; % = value ÷ parent × 100, where root size is the the browser default 16 px unless your CSS resets it; parent size is the em and % inherit from the containing element, not the root.
- Is the CSS Unit Converter free?
- Yes. There is no signup, no usage limit and no watermark — the calculator runs entirely in your browser.
- How do I read the result?
- rem is predictable because it always chains to the root; em compounds through nesting, which is why a button inside a heading can surprise you. For accessibility, size text in rem so it respects the user's browser zoom setting.
- Does the CSS Unit Converter store or send my data?
- No. Every calculation happens locally in the page, so the numbers you type are never uploaded or logged.
- Does it work on a phone and offline?
- Yes — the page is a single lightweight file that adapts to any screen size. Once it has loaded it keeps working without a network connection.