CSS Unit Converter
px, rem, em & pt
Convert CSS px, rem, em, and pt values with a configurable base font size for design tokens, typography, and responsive layouts.
This conversion runs only in your browser — nothing is uploaded.
- Root / base font size16px
- Unitpx
em in real CSS follows the parent element's font-size; this tool approximates rem and em with the same root/base value.
- px
- rem
- em
- pt
What is this tool?
This CSS unit converter translates between px, rem, em, and pt using a configurable root / base font size (default 16px). It is built for front-end work where design specs, tokens, and browser rendering use different units.
rem is relative to the root element’s font-size. In real CSS, em is relative to the current element’s computed font-size (often inherited from a parent), so nested em values compound. This calculator uses the same base for both rem and em so you can do quick token math—treat em results as an approximation unless the element’s font-size equals the root.
pt follows the CSS screen convention of 96dpi (1pt = 96/72 px). That is not the same as print workflows at 72dpi or 300dpi.
When to use
- Convert Figma or handoff pixel values into rem spacing and type scales
- Check what
1.5remor12ptbecomes when your root is not 16px - Document design-token tables (px ↔ rem) for a style guide
- Sanity-check print-oriented pt sizes against screen CSS
How to use
- Enter the numeric value and choose the source unit (px, rem, em, or pt).
- Set the root / base font size in pixels (default 16). All rows update live.
- Copy a single unit with the row button, or copy all values at once.
- If you nest
emin CSS, verify against the parent’s computed font-size—not only this table.
Examples
| Input / setting | Output | Notes |
|---|---|---|
16px, base 16 | 16.00px; 1.0000rem; 1.0000em; 12.00pt | Default browser root. |
24px, base 16 | 24.00px; 1.5000rem; 1.5000em; 18.00pt | Common heading / spacing token. |
1.5rem, base 16 | 24.00px; 1.5000rem; 1.5000em; 18.00pt | Relative unit back to pixels. |
12pt, base 16 | 16.00px; 1.0000rem; 1.0000em; 12.00pt | CSS 96dpi pt ↔ px edge case. |
Practical pitfalls
- em is parent-dependent. A child with
font-size: 1.2eminside a parent at1.25emis not1.2 × root; it compounds. This tool’s em column assumes font-size equals the base—an approximation. - Changing
html { font-size: 62.5% }(or similar) makes1rem = 10pxonly if the browser default was 16px; set the base field to match your real root. pthere is the CSS absolute unit at 96dpi, not physical print points at an arbitrary DPI.
Enter a numeric value only, such as 24, -0.5 or 1e2, without a unit suffix. A value such as 24px, a partial number or an infinite result shows an error. The root/base must be a finite number from 1 to 100px; empty or invalid bases do not produce results. For a focused calculation and a checked reference table, try px to rem, rem to px or rem to CSS points.
References
Last reviewed: 2026-10-11
Task guides with ready-to-use settings
- PX to REM Converter — Custom Root Font Size
Divide the pixel value by the root font size: at a 16px root, 24px is 1.5rem. Set the calculator's base to your computed html font size; conversion runs in your browser.
- REM to PX Converter — Check Computed Sizes
Multiply rem by the root font size: 1.5rem is 24px at a 16px root and 30px at a 20px root. Use your page's computed html font size. The calculator runs locally.
- REM to PT Converter — CSS & Print Reference
For CSS reference units, pt = rem * rootPx * 72 / 96. At a 16px root, 1rem is 12pt and 1.5rem is 18pt. Conversion stays in your browser; verify the printed output separately.
Frequently asked questions
- Which CSS units are supported?
- px, rem, em, and pt. Percentage (%) and viewport units (vw/vh) are out of scope.
- What is the root / base font size?
- It is the pixel size used as 1rem (and, in this calculator, 1em). The default is 16px, matching most browser defaults for `html`. Change it if your design system sets a different root size.
- Are rem and em the same here?
- Yes in this tool—both use the chosen base. In real CSS, rem is always relative to the root, while em multiplies the current element’s computed font-size (often a parent), so nested em values compound.
- How is pt converted?
- CSS treats 1pt as 1/72 of an inch at 96dpi, so 1pt = 96/72 px (≈ 1.333px). Print DPI workflows differ.