Conversion Form

REM
PX

About the Unit

REM (Root EM): REM is a relative unit that depends on the root font size, typically defined in the `<html>` element of the document. The main advantage of REM is that it provides a consistent and scalable way to work with measurement units in web design, especially when creating responsive and accessible layouts. When you define the root font size, for example, as 16px, 1rem will be equivalent to 16px. If the root font size is changed, all measurements in rem will adjust proportionally, which makes controlling the layout as a whole easier. This is especially useful for ensuring that the design is consistent and accessible, as users can adjust the font size in the browser. Using rem instead of px helps maintain the layout's proportions when scaling the page globally without needing to adjust each value individually.

Pro Tip: rempx

Px is fixed. Use for borders, icons, or pixel-perfect designs.

Quick Reference: Unit Conversion by Tens

REMPX
10rem160px
20rem320px
30rem480px
40rem640px
50rem800px
60rem960px
70rem1120px
80rem1280px
90rem1440px
100rem1600px
110rem1760px
120rem1920px
130rem2080px
140rem2240px
150rem2400px
160rem2560px
170rem2720px
180rem2880px
190rem3040px
200rem3200px
210rem3360px
220rem3520px
230rem3680px
240rem3840px
250rem4000px

Live Unit Preview

See how different CSS units affect the size of the box below:

10px

10rem

10em

10%

10vw

10vh

Common Mistake

Use px for fixed sizes like borders, and rem for scalable text.

Real Code Example

/* Mobile-first card with rem → px */
.card {
  padding: 0rem;     /* undefinedpx */
  font-size: 1.5rem;
  width: min(90vw, 40ch);
}

Frequently Asked Questions About REM

When should I use rem instead of rem?

Use rem for consistent scaling across components.

How many rem is 1rem?

1rem = 16px by default.

Is rem affected by zoom?

Yes, it scales with user settings and zoom.

Is rem good for fonts?

Yes, it's preferred for accessibility.

Keyboard Shortcuts

  • Ctrl + C: Convert
  • Ctrl + I: Invert units
  • Esc: Reset values

More popular conversions