REM to PX

Convert rem units to pixels.

FreeNo accountOn your device

Runs in your browser. How to verify

Loading tool…

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

1
Step 1
Enter the rem value.
2
Step 2
Adjust the root font size if it is not 16px.
3
Step 3
Press Run to see the pixels.

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?
16px with the default browser root size.
How do I convert rem to px?
Multiply the rem value by the root font size, for example 2 × 16 = 32.
How many px is 0.5rem?
8px at a 16px root.
Is rem the same as em?
No. rem uses the root size; em uses the current element's font size.

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 YouTube
  • What Is A RESTful API?

    Traversy Media

    API context for JWT, JSON, and encoding utilities.

    Watch on YouTube