CSS Unit Converter – Free Online Tool
Convert px, rem, em, pt and % instantly with a custom base font size — free, no signup.
Tool Interface
Convert CSS units instantly — px to rem, px to em, rem to px, em to px and more. Set your root font size and see every equivalent value at once.
How it works
- Enter a value and pick its unit, or tap a quick value.
- Set your base font size (usually 16px — the browser default root size).
- Copy any row or grab the whole set as a CSS comment block.
- rem is relative to the root font size; em is relative to the parent element's font size — with the same base they convert identically.
- Points use the CSS standard of 96px per inch (1pt = 1.333px).
100% private — everything runs in your browser, nothing is uploaded.
Rate this tool
About This Tool
Introduction
Mixing absolute and relative units is one of the easiest ways to break a layout. The Trencada CSS Unit Converter translates instantly between px, rem, em, pt, and % using your own base font size, so you can switch a stylesheet to relative units or check exactly how a size renders. It's free, requires no signup, and runs entirely in your browser.
How to Use
- Enter a value and pick its unit (px, rem, em, or pt) from the dropdown — or tap one of the quick-value chips for common pixel sizes.
- Set your base font size in pixels. The default 16px matches the standard browser root size; change it to match your project's root so rem, em, and % values recalculate.
- Read the All Equivalents table — every row shows the unit, its converted value, and a ready-to-paste CSS snippet.
- Press Copy as CSS to grab every equivalent as a CSS comment block, or Reset to return to 16px with a 16px base.
Key Features
- Five units at once: px, rem, em, pt, and % equivalents calculated together in a single table.
- Custom base font size: convert against your project's root size instead of a hard-coded 16px.
- Quick-value chips: one-tap presets for common sizes from 12px to 48px.
- Copy as CSS: exports every equivalent as a CSS comment block for your stylesheet.
- Copy-ready values: each table row includes the exact CSS snippet, e.g.
1rem. - 100% client-side: all math happens in your browser — nothing is uploaded or stored.
Why Choose Trencada
Trencada's developer tools are free forever with no account and no tracking. Pair this converter with the CSS Formatter to clean up your stylesheets, the CSS Clamp Generator for fluid responsive typography, or the general-purpose Unit Converter for length, weight, and other non-CSS measurements.
FAQ
How many pixels is 1rem?
By default, 1rem equals 16px — the standard browser root font size. If your project sets a different root size, enter it as the base font size and every equivalent recalculates.
What is the difference between rem and em?
rem is relative to the root (html) font size, while em is relative to the parent element's font size. The converter computes both against the base size you enter.
How are points converted to pixels?
The tool uses the CSS standard of 96px per inch, so 1pt = 1.333px.
Do I need to sign up or install anything?
No. The converter is free, works entirely in your browser, and requires no account.