PX to REM Converter Online [FREE]

Updated on July 24, 2024 by Editorial Team

Px to REM Converter

If you are a web developer or designer you’re probably familiar with the concept of CSS units. 

One of the most commonly used units is the pixel (PX). But as the requirements of responsive design arise, it becomes important to use scalable units like REM instead of PX.

In this post, we’ll explore in detail PX and REM units and show you how you can convert between them using a simple formula. Also, to make the process smooth, we have added a free PX to REM converter above. 

What is a Pixel (PX) Unit?

A pixel is the smallest unit of an image that can be displayed on a screen. In web development, pixels are used to define the size of an element on a web page.

One pixel is equal to one dot on a computer screen. The size of a pixel is not fixed, and it can vary depending on the device’s screen resolution. 

Pixels are commonly used to define the size of images, fonts, and other elements on a web page. When you set the font size of an element to 16px, it means that the text will be displayed in 16 pixels on the screen.

What is a Root Em (REM) Unit?

REM is a relative unit of measurement that is used in CSS to define font sizes and other styles. Unlike pixels (px), REM units are relative to the root element of the document.

The root element is the HTML element, which is the top-level element of the document. By default, the font size of the root element is 16px. This means that 1rem is equivalent to 16px. 

If you change the font to the root element’s size, all the document’s REM units will be adjusted accordingly.

Conversion Tables

Here are the conversion tables.

PX to REM

PXREM
1 px0.0625rem
2 px0.125rem
3 px0.1875rem
4 px0.25rem
5 px0.3125rem
6 px0.375rem
8 px0.5rem
10 px0.625rem
12 px0.75rem
14 px0.875rem
15 px0.9375rem
16 px1rem
18 px1.125rem
20 px1.25rem
24 px1.5rem
25 px1.5625rem
28 px1.75rem
32 px2rem
36 px2.25rem
40 px2.5rem
44 px2.75rem
48 px3rem
50 px3.125rem
56 px3.5rem
64 px4rem
72 px4.5rem
75 px4.6875rem
80 px5rem
90 px5.625rem
100 px6.25rem

REM to PX

REMPX
0.01rem0.16px
0.03rem0.48px
0.05rem0.8px
0.08rem1.28px
0.1rem1.6px
0.15rem2.4px
0.2rem3.2px
0.5rem8px
1rem16px
2rem32px
3rem48px
4rem64px
5rem80px
6rem96px
8rem128px
10rem160px
15rem240px
20rem320px
30rem480px
40rem640px
50rem800px
60rem960px
80rem1280px
100rem1600px

Note: The default browser font size is assumed to be 16px.

How to Convert PX to REM in CSS?

When it comes to responsive web design, using relative units like REM (Root Em) is a good practice. 

To convert PX to REM, you need to know the base font size of your document, which is typically 16px (the default size for most browsers).

Why Convert to REM?

  • Flexibility: REM units help your website look good on all devices. If someone changes their browser settings, your site will still look great.
  • Accessibility: REM units make your website easier to read for people who need larger text.

Formula to Convert PX to REM

To convert from PX to REM simply divide the pixel value by font size usually it is 16 px.

Rem Value = Pixel Value / Font Size

For example, if you want to convert 12 px to REM assuming font size 16 px:

Rem value = 12 / 16 = 0.75 rem

Also, if you want to convert REM into pixels, you can use the following formula:

px = rem * base font size

20 checklist for wordpress site maintenance px to rem converter online [free] from the plus addons for elementor
Do you Manage WordPress Websites? Download Our FREE E-Book of 20+ Checklist for WordPress Site Maintenance. ​



    FAQs on PX to REM Conversion

    Why use PX instead of REM?

    Using px instead of rem offers precise control over element sizes, ensuring consistent design. This can be useful for specific design elements where exact sizing is crucial

    Are REM and EM the same?

    No, rem and em are not the same. REM units are relative to the root element’s font size, ensuring consistent scaling across the site. EM units are relative to the font size of their parent element, which can lead to varying sizes depending on the element’s hierarchy.

    Does Figma use REM?

    No, Figma does not use REM units directly. Figma is a design tool focused on pixels for creating web and UI designs. However, designers can manually convert pixel values to REM for use in CSS when implementing their designs in code.

    How to convert REM to PX?

    To convert REM to PX, multiply the REM value by the root element’s font size (usually 16px). For example, 2 REM is 32 PX (2 REM * 16px). This conversion helps maintain consistent, scalable designs across different devices.

    Is REM always 16px?

    No, rem is not always 16px. Rem units are relative to the root element’s font size, which is typically 16px by default in most browsers. However, if the root font size is changed, the value of 1rem will change accordingly.