Free online tools
px to rem converter
Enter a value in pixels or in rem and the other field updates instantly. The default base is 16 px, and you can change it.
Default 16, the font size of the html element.
Common values
| px | rem |
|---|---|
| 10px | 0.625rem |
| 12px | 0.75rem |
| 14px | 0.875rem |
| 16px | 1rem |
| 18px | 1.125rem |
| 20px | 1.25rem |
| 24px | 1.5rem |
| 28px | 1.75rem |
| 32px | 2rem |
| 40px | 2.5rem |
| 48px | 3rem |
| 64px | 4rem |
Your data never leaves your browser. Nothing is sent to a server.
How to use it
- Enter a value in pixels or in rem.
- If your base font size is not 16 px, change the base.
- Copy the result with the rem unit.
- Use the table to check typical sizes quickly.
How rem is calculated
The rem unit is relative to the font size of the root html element. With the default 16 pixels, 1 rem is 16 px, so 24 px is 1.5 rem. The formula is pixels divided by the base size.
Why rem instead of px
Sizes in rem scale with the browser font settings. Someone who raised the default text size gets a larger interface. Pixels do not do that, which is why rem is usually the better choice for text and spacing.
What not to convert to rem
Thin borders, shadows and icon details are often left in pixels because they should look the same at every text size. Use rem where the interface should grow with readability.
Frequently asked questions
Need more than a tool?
If there is a bigger project behind it, a website, a shop or an app, describe it in a short brief. We reply with specifics and no obligation.
Describe your project