REM to PX
Convert rem units to pixels.
About this tool
Enter a rem value and read it in pixels. The calculation is rem multiplied by the root font size, which defaults to 16px. Change the root size if your CSS sets a different html font-size.
How to use
How it works
One rem equals the font size of the root html element. Browsers default to 16px, so 1rem = 16px, 1.5rem = 24px and 0.875rem = 14px. If a user changes their browser font size, rem values scale with it while px values do not.
px = rem × root font size
Worked example
1.5 rem at the default root
- Input
- 1.5 rem, root 16px
- Output
- 24
- Walkthrough
- 1.5 × 16 = 24 pixels. With a root of 10px the same 1.5rem would be 15px.
Limitations
- The result is a plain number without the px unit.
- Uses the root font size you enter, not your site's actual stylesheet.
- Does not convert em, which depends on the parent element's size.
Questions
How many pixels is 1 rem?
How do I convert rem to px?
How many px is 0.5rem?
Is rem the same as em?
Features
- Custom root size
- Instant result
- Runs in your browser
Related resources
Guides and videos from around the web—opens on YouTube or the publisher’s site.
TypeScript in 100 Seconds
Fireship
Typed JS snippets often get formatted or hashed nearby.
Watch on YouTubeWhat Is A RESTful API?
Traversy Media
API context for JWT, JSON, and encoding utilities.
Watch on YouTube
- Regular expressions
MDN
JS regex guide aligned with browser-based testers.
- MDN Web Docs
MDN
Primary reference for web APIs these developer tools touch.