PX to REM

PX to REM Converter

Easily convert pixel (px) values to rem units based on a custom root font size. Perfect for creating responsive, scalable web designs.

PX to REM
REM to PX
px
px
Conversion Result
0 rem
rem
px
Conversion Result
0 px

Fast Conversion

Get instant conversions between pixels and rem units with our optimized calculator.

Custom Base Size

Set your preferred base font size (default 16px) for accurate rem calculations.

Keyboard Shortcuts

Use keyboard shortcuts for faster conversions and copying results.

Keyboard Shortcuts

Enter
Calculate conversion
Ctrl + Enter
Calculate and copy result
Tab
Switch between input fields
R
Reverse converter (PX↔REM)
Copied to clipboard!

PX ↔︎ REM conversion tables

PixelsREM
1px0.06rem
2px0.13rem
3px0.19rem
4px0.3rem
5px0.3rem
6px0.4rem
8px0.5rem
10px0.6rem
12px0.8rem
14px0.9rem
15px0.9rem
16px1rem
18px1.1rem
20px1.3rem
24px1.5rem
25px1.6rem
28px1.8rem
32px2rem
36px2rem
40px3rem
44px3rem
48px3rem
50px3rem
56px4rem
REMPixels
0.01rem0.16px
0.03rem0.5px
0.05rem0.8px
0.08rem1.3px
0.1rem1.6px
0.15rem2px
0.2rem3px
0.5rem8px
1rem16px
2rem32px
3rem48px
4rem64px
5rem80px
6rem96px
8rem128px
10rem160px
15rem240px
20rem320px
30rem480px
40rem640px
50rem800px
60rem960px
80rem1280px
100rem1600px

PX ↔︎ REM conversion tables

This calculator converts pixels to the CSS unit REM. The conversion is based on the default font-size of 16 pixel, but can be changed.

With the CSS rem unit you can define a size relative to the font-size of the HTML root tag.

The conversion works of course in both directions, just change the opposite input field.

An example

So if we take the default size as an example, than 1px represents 0.0625rem and, in the other direction, 1rem represents 16px.

EM vs. REM: The differences

Inside a sinlge document, the length of a REM unit is everywhere the same, it can just differ between documents. EM on the other side can differ between every element, because it is relative to the elements own font-size (excpetion is the font-size itself, in it EM is relative to the parent).

REM is the newer unit, older browsers don’t support it.

How to convert PX to REM?

To convert px to rem, you should know total size of 1 REM, default is 16px Then, just apply formula: px / rem For example, with 16px size of 1rem, 32px will be converted to: 32 / 16 = 2rem

What is the PX to REM formula?

px / rem

What is rem unit?

REM is defined relative to the font size of the root element. The root element is matched by the :root pseudo-class or the html selector. 1 REM therefore takes on the value which is given to the font-size of the root element. This means that 1 REM keeps the same value throughout your whole CSS code.

What is px unit? (Pixels)

Pixel unit is the theorical smallest dot displayed on a computer screen. Nowadays, pixel unit can differ between physical resolution and logical resolution. This difference is called device pixel ratio or DPR: Logical resolution = physical resolution / device pixel ratio. So, a screen with 1024×768 physical resolution with a DPR of 2 will have a 512×384 logical resolution.

Get Started

Build a complete site with AI Assistant

Start your free trial now and witness your ideas come to life, effortlessly and creatively.