How to use PX to REM Converter
- Enter a value and its unit.
- Set the root font size (16 px by default).
- Read the converted values and the table of common sizes.
About this tool
A rem is relative to the root element's font size, which is 16 px in most browsers. Using rem lets text and spacing scale when users change their default font size, which is better for accessibility than fixed pixels. The conversion is value / base for px to rem.
An em is relative to the parent's font size, so nested elements compound.
Frequently Asked Questions
- What is 16px in rem?
- 1rem, with the default 16 px base.
- Should I use rem or px?
- Use rem for font sizes and spacing so they respect user preferences, and px for borders and fine details.
Related tools
- CSS Clamp GeneratorCreate fluid sizes that grow between a minimum and maximum viewport.
- Length ConverterConvert between millimeters, centimeters, meters, kilometers, inches, feet, yards and miles.
- CSS Box Shadow GeneratorAdjust the sliders and copy the box-shadow CSS.
- Glassmorphism CSS GeneratorBuild a frosted glass card and copy the CSS.
- CSS Gradient GeneratorDesign a gradient visually and copy the CSS background.
- CSS Button GeneratorCreate a styled button and copy its CSS, including the hover state.