PX to REM Converter
Convert pixel values to REM units.Runs in this tab.⌘ ↵ runs it
| Pixels | REM |
|---|---|
| 12px | 0.75rem |
| 14px | 0.875rem |
| 16px | 1rem |
| 18px | 1.125rem |
| 20px | 1.25rem |
| 24px | 1.5rem |
| 32px | 2rem |
| 48px | 3rem |
| 64px | 4rem |
Next step
AtriumKitFrom the team behind browserutils
Turn a click-through into an interactive demo
AtriumKit records your web app once in Chrome and turns every click into a step of a demo you can embed or share. There’s a free plan.
Try AtriumKit freeAbout PX to REM Converter
Free online PX to REM converter. Convert CSS pixel values to REM units based on a configurable root font size. It runs in your browser. Nothing is sent to a server.
Questions
What is the difference between PX and REM in CSS?
PX (pixels) is an absolute unit that stays the same size regardless of user settings, while REM is relative to the root element font size. Using REM allows your layout to scale proportionally when users change their browser font size.
How do I convert pixels to REM?
Divide the pixel value by the root font size (typically 16px). For example, 24px equals 1.5rem when the root font size is 16px. This tool handles the calculation automatically for any base size you configure.
Can I change the base font size in the PX to REM converter?
Yes, you can set the root font size to any value. The default is 16px, which matches most browser defaults, but you can adjust it to match your project settings.
Should I use REM or EM for responsive design?
REM is generally preferred because it always references the root font size, making calculations predictable. EM is relative to the parent element font size, which can cause compounding issues in nested elements.
Comments
More in CSS & Design
- Color Converter
- CSS Gradient Generator
- Box Shadow Generator
- Color Palette Generator
- Color Contrast Checker
- Tailwind Color Picker
- CSS Animation Generator
- CSS Flexbox Generator
Comments