DevFiddleDevFiddle
HomeToolsSnippetsArticles
Explore tools
Home>Tools>Px to rem converter

Px to rem converter

Turn pixel values into rem units, or go the other way. Set your root font size and both fields stay in sync. Everything runs in your browser, so your values stay on your device.

px
rem
16px equals 1rem at a root size of 16px.

The font size set on your html element.

Common sizes
Browsers default to 16px. If your CSS sets html { font-size: 62.5% }, use 10.
Tip: press Enter in either field to copy the rem value.

Common sizes

Based on a root font size of 16px.

UsePixelsRemActions
Caption12px0.75rem
Small text14px0.875rem
Body text16px1rem
Large body18px1.125rem
Subheading24px1.5rem
Heading32px2rem
Large heading48px3rem
Display64px4rem

How it works

1

Set the root size

Use 16px unless your project sets a different font size on the html element.

2

Type a value

Enter pixels or rem. The other field updates as you type.

3

Copy the result

Copy the rem value with its unit, ready to paste into your CSS.

Questions

More tools

Hex to RGB converter

Type a hex code to get its RGB values, or set RGB to get hex.

Open tool
JSON formatter

Check JSON for errors and print it in a readable layout.

Open tool
Case converter

Convert text to uppercase, lowercase, title case and more.

Open tool
About© DevFiddle 2026