Convert px to rem
Enter pixel values one per line or paste CSS containing px lengths. The output divides each matching value by 16 and adds the rem unit.
24px becomes 1.5rem, and 32px becomes 2rem.
Root font size
A rem equals the computed font size of the document root. This focused conversion assumes a 16px root, which matches the common browser default when the page does not override it.
Open the full CSS Unit Converter when the project uses another root size.
CSS replacement
Only values carrying the px unit are replaced inside CSS. Unitless numbers, percentages, and values already written as rem remain unchanged.