REM to Percent Converter

A rem value measures against the root. A percentage measures against whatever sits one level up. Pick what the percent should be relative to, type the rem value, and copy a declaration you can paste straight into a stylesheet.

Browser default is 16. Pick 10 if your stylesheet sets html{font-size: 62.5%}.
Read the computed font-size of the parent in DevTools, not the value in your source.
rem
↑ ↓ step by 0.125, hold Shift for 1. Typing 1.5rem with the unit works too.
0%

Type a rem value to see the working.

Pixels0px
Same as0em
Ratio0
font-size: 0%;

Convert a block of CSS

Paste rules or a list of bare values. In rules, font-size converts against the parent font size and width, padding, margin and gap convert against the container width. Properties where percent means something else, such as line-height, height or border-radius, stay in rem.

0 values

Each reference applies to every rule in the block. A rule whose element sits in a different parent or column needs its own pass with the right size set above.

Lookup at 16px root, 16px parent

Click a row to load it.
REMPixelsPercentTypical use

The formula, written out

Both units end up as pixels in the browser. Convert rem to pixels first, then express those pixels as a share of the reference.

percent = (rem × root font size) ÷ reference × 100

With the default 16px root and a 16px parent, the two units line up one to one, so 1.5rem becomes 150%. The numbers drift apart the moment the parent changes. Three worked cases:

Default page 1.5rem, root 16, parent 16 24px ÷ 16px = 150%
Small card text 1.25rem, root 16, parent 14 20px ÷ 14px = 142.86%
62.5% root trick 2.4rem, root 10, parent 12 24px ÷ 12px = 200%

Percent means a different thing on each property

This is where most rem to percent conversions go wrong. A percentage has no fixed reference. The property decides what it measures against, which is why the converter asks you to pick a mode before you type.

PropertyPercent is relative to
font-sizeThe parent element's computed font size
width, max-widthThe containing block's width
padding, marginThe containing block's width, even for top and bottom
heightThe containing block's height, and only when that height is set
line-heightThe element's own font size, not the parent's
transform: translateThe element's own box

The padding row surprises people. padding-top: 10% on a box inside a 600px column gives 60px of vertical space, whatever the box height. Use the container width mode for padding and margin, and enter the column width, not a height.

Line height is the other trap. line-height: 150% resolves against the element's own font size once, then the pixel result is inherited by children. A unitless line-height: 1.5 is almost always what you want instead, since children recalculate it from their own size.

When converting rem to percent is the right move

When to keep rem

Rem exists so sizes do not compound. Percent font sizes multiply down the tree. A list item at 90% inside another list item at 90% lands at 81% of the outer size, and three levels down body text gets small fast. If a value should look the same wherever it appears, such as body copy, spacing tokens or form controls, leave it in rem.

Both units respect a reader's browser text size setting, so accessibility is not a reason to pick one over the other. The difference is purely about which ancestor you want the size to track.

Limits of this converter

All of the maths runs in your browser tab. Nothing you type or paste leaves the page. For the reverse direction, Percent to REM takes a percentage back to a root-relative value.

REM to percent questions

What developers ask when moving between root-relative and parent-relative sizes.

What is 1rem in percent?

At the default 16px root and a 16px parent, 1rem equals 100%. Change the parent to 14px and the same 1rem becomes 114.29%, because 16 divided by 14 is 1.1429. The percent value always depends on the parent, while the rem value does not.

How do I convert rem to percent by hand?

Multiply the rem value by the root font size to get pixels, divide by the reference size, then multiply by 100. For 1.25rem with a 16px root and a 20px parent, that is 20px divided by 20px, which gives 100%.

Is 1.5rem the same as 150%?

Only when the parent font size equals the root font size. On a default page with nothing resized in between, yes. Inside a card set to 0.875rem, 1.5rem stays at 24px while 150% drops to 21px.

Why does my percent padding not match the rem value?

Percent padding measures against the width of the containing block, not any font size. Switch the converter to container width mode and enter the width of the parent box in pixels.

Should I use rem or percent for font sizes?

Use rem for sizes that should stay fixed across the page, such as body copy and spacing tokens. Use percent, or em, for pieces that should scale with their surroundings, such as an icon or badge sitting inside text of varying size.

What root font size should I enter?

Enter 16 unless your stylesheet changes the html font size. A rule like html{font-size: 62.5%} makes the root 10px. Check the computed font-size on the html element in DevTools to be sure.

Does rem to percent conversion affect accessibility?

No. Both rem and percent font sizes scale when a reader raises the browser default text size. Pixel font sizes are the ones to avoid for body text, since some browsers will not scale them with that setting.

Can I convert a whole stylesheet at once?

Paste it into the batch box. font-size values convert against the parent font size, width and spacing values against the container width, and line-height, height or border-radius stay in rem. Treat the output as a draft, since rules for elements in different parents need separate passes.