CSS Units
Convert px / rem / em with a custom root size.
A free CSS unit converter between px, rem and em, with a configurable root font size (default 16px). Enter a value and unit to see the equivalents live — handy for building scalable, responsive styles. It runs entirely in your browser.
How to use
- Enter a value and pick its unit (px / rem / em).
- Set the root font size (default 16).
- Read the equivalents in the other units and copy them.
FAQ
- What root size should I use?
- Most browsers default to a 16px root, so 16 is the usual choice. If you set a custom font-size on :root or html, use that value instead.
- What is the difference between rem and em?
- rem is always relative to the root font size; em is relative to the parent element’s size and compounds with context. This tool converts using the root size you provide as a quick reference.
Related tools
- 2FA Authenticator — End-to-end encrypted 2FA vault with live codes.
- Password Vault — Zero-knowledge vault for site logins; survives password changes.
- Data Format — Convert between JSON, YAML, TOML, CSV.
- Base64 — Encode / decode text & files in Base64.
- URL Encode — Encode / decode URL components.
- JWT Decode — Inspect JWT header & payload.