PX to REM Converter
Convert pixel values to rem/em units with configurable base font size.
Formula
Related tools
Frequently Asked Questions
What is the difference between rem and em?
rem is relative to the root (html) font size, so 1rem is the same everywhere on the page, usually 16px. em is relative to the parent element's font size, so it compounds when elements are nested: 1.2em inside 1.2em is 1.44 times the root size.
How do I convert px to rem?
Divide the pixel value by the root font size: rem = px รท 16 with the browser default. 24px is 1.5rem, 14px is 0.875rem and 32px is 2rem.
What's the default base font size?
The default is 16px, which is the standard browser default. You can change it to match your project.
Can I convert multiple values at once?
Yes! Enter values separated by commas, spaces, or on new lines, and the tool will convert them all instantly.
Why use rem instead of px?
Sizes in rem scale when a visitor raises the browser's default font size, which helps people who need larger text. Pixel sizes stay fixed and ignore that setting.
Related Tools
CSS Clamp Generator
Generate responsive CSS clamp() values for fluid typography.
Golden Ratio Calculator
Split number into 1.618 golden ratio parts.
CSS Gradient Generator
Create linear and radial gradients with copy-ready CSS.
CSS Box Shadow Generator
Build layered shadows with live preview and copy-ready CSS.
CSS Button Style Generator
Design a button visually with color, border-radius, shadow, and hover effects. Get copy-ready CSS.
HEX to RGB Converter
Convert HEX to RGB and RGB to HEX, with the math shown step by step.
Color Palette Generator
Generate harmony-based palettes with export and contrast checks.
Color Format Converter
Convert HEX, RGB, HSL, HSV and CMYK, including alpha and CSS color names.
CSS Glassmorphism Generator
Create frosted glass effects with live preview and copy-ready code.
SVG Path Visualizer
Draw SVG path data on a grid with every command explained.
Contrast Checker
Test WCAG AA and AAA color contrast accessibility.
CSS Filter Tester
Preview and tune CSS image filters with live sliders.