Gliora

Px to rem converter

Px to rem converter (and rem to px)

px → rem1.5 rem
rem → px24 px

The default base value is 16 px (the usual root font size). Change one field and the other updates.

This px to rem converter switches between pixels and rem (or em) using a base font size you can customize — 16 px by default.

Convert CSS units instantly

Change the pixel value, the rem value or the base size, and the other fields update automatically. Useful when translating design specs (usually in px) into the rem-based units common in CSS.

FAQ

Why isn't 1 rem always equal to 16 px?
Because rem is relative to the root font size, which defaults to 16 px in most browsers but can be changed by the page's CSS or the user's accessibility settings.
What's the difference between rem and em?
rem is always relative to the root (html) font size, while em is relative to the font size of the closest parent element. This tool treats them the same, using the base size you set.
Why use rem instead of px in CSS?
rem values scale automatically when a user changes their browser's default font size, which makes layouts more accessible than fixed pixel values.