CSS Unit Converter
Convert px, rem, em, pt and percent values in bulk with a configurable root size.
rem is relative to the root font size, em and % are relative to the parent font size.
Values (one per line)
Conversion table
How to use it
- Set the root font size, which is the reference for rem, and the parent font size, which is the reference for em and percent.
- Pick the unit of the numbers you paste, for example rem if the values come from a design token file.
- Paste one value per line into the input box. Blank lines are ignored and lines that are not numbers are counted as skipped.
- Read the table, where each row shows the same length in all five units.
- Copy the table or download it as a plain text file.
Common use cases
- Design token migration - turn a column of px values into rem before pasting them into a stylesheet.
- Spacing audits - check that a spacing scale lines up across px and rem based units.
- Print styles - see the pt equivalent of screen sizes when you prepare a print stylesheet.
- Percentage sizing - work out what percent of the parent font size a given em value represents.
Why it stays private
The conversion is plain arithmetic on the numbers you type. There is no network request, no upload and no account, so the values never leave your browser.
FAQ
Q: Why does em differ from rem in the table? A: rem is always relative to the root font size, while em and percent are relative to the font size of the parent element. The tool asks for both reference sizes so you can model a real nesting situation.
Q: How is pt converted? A: The tool uses the CSS definition where 1pt equals 4/3 of a pixel, so 12pt is 16px. That is the ratio browsers apply at the standard 96dpi reference.
Q: Why did some lines disappear? A: Lines that cannot be parsed as a number are skipped and counted in the status line next to the buttons. Remove commas, unit words and other text so each line holds a single number.
Your data stays on this device
CSS Unit Converter runs 100% locally. Everything you paste or drop is processed by your own browser and never transmitted. Nothing is stored on our servers — close the tab and it is gone.
Nothing you type is sent to a server, logged, or used for analytics. The page works even with your network disconnected after first load.