Conversion Form

REM
VH

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: remvh

Be cautious with vh on mobile as address bars can hide content! Rem ensures consistent scaling.

Quick Reference: Unit Conversion by Tens

REMVH
10rem14.814815vh
20rem29.62963vh
30rem44.444444vh
40rem59.259259vh
50rem74.074074vh
60rem88.888889vh
70rem103.703704vh
80rem118.518519vh
90rem133.333333vh
100rem148.148148vh
110rem162.962963vh
120rem177.777778vh
130rem192.592593vh
140rem207.407407vh
150rem222.222222vh
160rem237.037037vh
170rem251.851852vh
180rem266.666667vh
190rem281.481481vh
200rem296.296296vh
210rem311.111111vh
220rem325.925926vh
230rem340.740741vh
240rem355.555556vh
250rem370.37037vh

Live Unit Preview

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

10px

10rem

10em

10%

10vw

10vh

Common Mistake

Be cautious with vh on mobile as address bars can hide content! Rem ensures consistent scaling.

Real Code Example

/* Mobile-first card with rem → vh */
.card {
  padding: 0rem;     /* undefinedvh */
  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