Pixels to REM Converter

Easily convert pixels (PX) to REM with our free online PX to REM converter. REM (Root EM) is a font-relative unit commonly used in CSS for scalable and responsive designs. Use this tool to quickly calculate the REM equivalent of any pixel value and ensure consistent typography across your web projects.

Pixel to REM Converter

Base

Steps to Use the Converter:

Follow these simple steps to convert Pixels (PX) to REM:

  • Enter the Base Font Size value.
  • Input the Pixels value you want to convert.
  • Press Enter or click the Convert button.

What is the Root Element?

The root element in an HTML document is the <html> tag, which defines the base font size for REM calculations in CSS.

How to Set Font-Size on the Root Element?

There are three ways to apply font-size to the <html> element:

  • Inline Style

    <html style="font-size: 18px;">
  • Internal Stylesheet

    <style>
    html {
        font-size: 18px;
    }
    </style>
  • External Stylesheet

    <link rel="stylesheet" type="text/css" href="styles.css">
    html {
        font-size: 18px;
    }

How to Convert PX to REM?

The base font size on the root element determines REM calculations in CSS.

  • PX to REM Conversion Formula

    REM = PX / Base Font Size
  • Example Calculation

    If the root font-size is 18px, and you need to convert 36px into REM:

    REM = 36px / 18px
    REM = 2

    So, 36px is equal to 2rem when the root font-size is 18px.

REM to Pixels Converter

Convert REM to PX easily with this free tool. REM is a font-relative unit in CSS, where 1REM equals the root font size set on the <html> element.

REM to Pixel Converter

Base

Steps to Use the Converter:

Follow these simple steps to convert REM to Pixels (PX):

  • Enter the Base Font Size value.
  • Input the REM value you want to convert.
  • Press Enter or click the Convert button.

How to Convert REM to PX

REM (Root EM) is based on the root font-size. Converting it to pixels (PX) depends on the font-size set on the <html> element.

  • Set the Root Font Size

    If the root font-size is defined as 16px in CSS:

    html {
    font-size: 16px;
    }

    Then, 1rem = 16px.

  • REM to Pixel Conversion Formula

    To manually convert REM to Pixel, use the following formula:

    Pixels = REM * Base Font Size

Common Pixels to REM Conversions:

PX REM
4px0.25rem
8px0.5rem
12px0.75rem
16px1rem
20px1.25rem
24px1.5rem
32px2rem
40px2.5rem
48px3rem
64px4rem
96px6rem
128px8rem
160px10rem
176px11rem
192px12rem
208px13rem
224px14rem
256px16rem
320px20rem
480px30rem
576px36rem
768px48rem
800px50rem
960px60rem
992px62rem
1024px64rem
1120px70rem
1200px75rem
1280px80rem
1440px90rem
1600px100rem