Loading…

How to use PX to REM Converter

Enter a pixel or rem value and set your root font size, and the tool converts between the two live.

Frequently asked questions

How do I convert px to rem?

Divide the pixel value by the root font size. With the default 16px root, 24px equals 1.5rem.

What is the root font size?

The font-size set on the html element. Browsers default it to 16px, but you can change it in the converter.

Why use rem instead of px?

rem units scale with the user's root font size, making layouts more accessible and responsive.

More CSS Generators

CSS Specificity Calculator
Score any CSS selector
CSS Pattern Generator
Create pure-CSS background patterns from gradients, no images
Cubic Bezier Editor
Build cubic-bezier easing curves with a live animated preview
CSS Text Stroke Generator
Add outlined text with -webkit-text-stroke and live preview
CSS Outline Generator
Generate outline width, style, color and offset with preview
CSS Backdrop Filter Generator
Build backdrop-filter blur, brightness and saturation effects
CSS Blend Mode Generator
Preview all mix-blend-mode values on overlapping shapes
CSS Mask Fade Generator
Fade element edges with mask-image linear gradients
CSS 3D Perspective Generator
Rotate elements in 3D space with perspective and live preview
CSS Aspect Ratio Generator
Get aspect-ratio plus the padding-hack fallback for any ratio
CSS Multi-Column Generator
Build newspaper-style column-count layouts with column rules
CSS Object Fit Generator
Preview object-fit and object-position on images live

← View all CSS GeneratorsBrowse all 1,100+ tools →