ilovekit

CSS Unit Converter

12 tools

Convert between px, rem, pt, and percent.

Runs in your browser — your files and text stay on your device

Convert a pixel value to rem, pt and percent for CSS. Set your root font size, since rem and percent depend on it, and copy any result. It's handy when translating a design in pixels into scalable units.

Flexbox PlaygroundGrid GeneratorBox ShadowText ShadowBorder RadiusClip PathGlassmorphismAnimationEasing CurveFilterFluid TypographyUnit Converter
px
16px
rem
1rem
pt
12.00pt
%
100.00%

How to use this tool

  1. 1Enter a pixel value, and your root font size if it's not the browser default (16px).
  2. 2See the equivalent rem, pt, and percentage values instantly.
  3. 3Click Copy next to any value to grab it.

Frequently asked questions

Why does rem depend on the root font size?

1rem always equals the <html> element's font size. If a page sets a custom root font size (common for scalable typography systems), rem values scale relative to that instead of the browser default 16px.

When should I use rem instead of px?

rem respects a user's browser font-size preference (accessibility) and scales consistently if you change the root font size — generally preferred for typography and spacing over fixed px.

Is this calculated on a server?

No — it's plain JavaScript math running in your browser.

Guides

All guides →