REM to PX Converter | Free Convert REM to Pixels Online

REM to PX Converter

Convert REM units to pixels instantly.

Converted Result 16 px 1 rem = 16 px

Convert REM to PX using the root font size of your website. This REM to PX Converter helps you find the pixel equivalent of CSS rem values for font sizes, padding, margins, and other layout measurements. Enter your rem value, keep the standard 16px root font size or change it to match your project, and calculate the result.

For example, 1rem equals 16px when the root font size is 16px, while 1.5rem equals 24px. If your website uses a different root font size, the pixel values change accordingly. The converter handles that calculation and lets you copy the result for use in your CSS.

Quick Answer: How Do You Convert REM to PX?

To convert rem to pixels, multiply the rem value by the root element’s font size in pixels. With a 16px root font size, 1rem = 16px, 1.25rem = 20px, and 2rem = 32px.

Enter the REM Value and Root Font Size (PX) in the converter above, then click Calculate. The result panel displays the equivalent pixel value.

What Is a REM to PX Converter?

A REM to PX Converter calculates the pixel equivalent of a CSS measurement written in rem units. It is useful when you need to understand the computed size of an element or compare rem-based CSS with pixel measurements in a design.

REM stands for “root em.” In CSS, 1rem equals the computed font size of the document’s root element, normally the <html> element. A common browser default is 16px, but a stylesheet or browser preference can change that value.

PX represents CSS pixels, a unit used to define dimensions in stylesheets. CSS pixels are reference units and should not be confused with individual physical pixels on a high-density display.

The relationship is straightforward: rem specifies a measurement relative to the root font size, while px expresses the calculated length in CSS pixels.

How to Use the REM to PX Converter

The converter has two input fields, a result panel, and three action buttons.

Step 1: Enter the REM Value

Locate the field labeled REM Value and type the value you want to convert. For example, enter 1.5 if your CSS uses 1.5rem.

Step 2: Set the Root Font Size

The Root Font Size (PX) field starts at 16. Keep this value if your website uses a 16px root font size.

If your project uses a different size, enter that instead. For example, use 18 for an 18px root or 20 for a 20px root.

Step 3: Click Calculate

Press Calculate to convert the entered rem value into pixels.

The Converted Result panel shows the pixel equivalent in a prominent blue number, with a smaller conversion explanation underneath. The default example displays 16 px for 1rem at a 16px root size.

Step 4: Copy the Result

Click Copy Result to copy the calculated value. You can then use it when checking your CSS measurements or comparing a design’s dimensions.

Step 5: Reset the Converter

Select Reset when you want to clear the current calculation and start again.

REM to PX Conversion Formula

The conversion uses a single multiplication. You need the rem value and the root font size in pixels.

REM to PX Formula

Pixels (px) = REM Value × Root Font Size (px)

Example: 1.5 × 16 = 24px

Here, the REM Value is the CSS measurement you want to convert, and the Root Font Size is the computed font size of the document’s root element.

For example, if the root font size is 16px and your CSS contains padding: 1.5rem;, the padding is equivalent to 24 CSS pixels.

To reverse the calculation, divide the pixel value by the root font size. You can use the separate PX to REM Converter when your starting measurement is in pixels.

How Many Pixels Is 1 REM?

At the common 16px root font size, 1rem equals 16px. This is the value most developers encounter when the browser’s default font size has not been overridden.

However, 1rem does not always equal 16px. Its pixel equivalent depends on the root font size.

Root Font Size 1rem in Pixels 1.5rem in Pixels
10px 10px 15px
12px 12px 18px
14px 14px 21px
16px 16px 24px
18px 18px 27px
20px 20px 30px
24px 24px 36px

For example, a heading set to font-size: 2rem; computes to 32px with a 16px root and 40px with a 20px root. The CSS declaration stays the same, but the calculated length changes.

REM to PX Conversion Table (16px Root Font Size)

The following table provides common rem-to-pixel conversions used in CSS typography, spacing, and layout design.

REM Value Pixels (PX)
0.125rem 2px
0.25rem 4px
0.5rem 8px
0.625rem 10px
0.75rem 12px
0.875rem 14px
1rem 16px
1.125rem 18px
1.25rem 20px
1.5rem 24px
1.75rem 28px
2rem 32px
2.5rem 40px
3rem 48px
4rem 64px
5rem 80px

All values in this table assume a 16px root font size. For a different base, change the Root Font Size field in the converter rather than relying on this reference table.

Practical CSS Example: Converting REM to Pixels

Suppose you’re reviewing the styles for a website card component. Its CSS contains the following declarations:

.card {
  font-size: 1rem;
  padding: 1.5rem;
  margin-bottom: 2rem;
  border-radius: 0.5rem;
}

With a 16px root font size, the corresponding measurements are:

  • Font size: 1rem = 16px
  • Padding: 1.5rem = 24px
  • Bottom margin: 2rem = 32px
  • Border radius: 0.5rem = 8px

These equivalents make it easier to compare the CSS with a pixel-based design specification. You can check each measurement without replacing the rem units in your stylesheet.

If the root font size increases to 20px, the same card has a 20px font size, 30px padding, 40px bottom margin, and 10px border radius. This illustrates why knowing the actual root size matters.

What’s the Difference Between REM, PX, and EM?

REM, PX, and EM are CSS length units, but they determine sizes differently.

CSS Unit How Its Size Is Determined Typical Use
PX CSS reference pixel Borders, fixed measurements, detailed layout specifications
REM Root element’s font size Typography, page-wide spacing, scalable size systems
EM Element’s font size, or inherited font size when used for font-size Component-relative sizes and spacing

The important distinction is that rem refers to the root element rather than the font size of a nested component. This makes it useful for maintaining consistent proportions across a site.

Neither rem nor em automatically changes with the viewport width. If you’re working with viewport-relative dimensions, the PX to VW Converter is designed for that different conversion.

When Is Converting REM to Pixels Useful?

REM-to-pixel conversion is helpful when you need to compare CSS values with design measurements or understand how an existing layout is sized.

  • Checking typography: Find the pixel equivalent of heading, body text, and label font sizes.
  • Reviewing spacing: Compare rem-based padding, margins, and gaps with design specifications.
  • Building design systems: Understand the pixel equivalents of a shared rem-based spacing scale.
  • Debugging CSS: Check whether an unexpected dimension comes from the root font size.
  • Reviewing accessibility: See how font-relative dimensions change when the root size changes.

For designers and front-end developers, the main benefit is knowing what a rem-based measurement represents under a specific root font size.

How to Find Your Website’s Root Font Size

Before converting rem to pixels, check whether your website defines a custom font size on the html element.

For example, the CSS declaration html { font-size: 18px; } means that 1rem equals 18px under that rule.

You can also inspect the computed root font size in your browser’s developer tools. In the browser console, run:

getComputedStyle(document.documentElement).fontSize

This returns the computed root font size, typically as a pixel value such as "16px". Enter that number into the converter’s Root Font Size field.

This is especially useful when working on a site with inherited styles, user preferences, or an existing design system whose root font size isn’t immediately obvious.

Common REM to PX Conversion Mistakes

Assuming 1rem Always Equals 16px

The 16px relationship is common, but a site may use another root font size. Use the actual value when checking an existing design.

Confusing REM With EM

REM uses the root element’s font size. EM depends on the element’s font size or inherited font size, depending on the CSS property. Mixing up these units can produce unexpected calculations.

Confusing CSS Pixels With Physical Pixels

A CSS pixel is not necessarily one physical pixel on a display. Screen density and browser rendering can affect the relationship between CSS measurements and hardware pixels.

Using REM as a Replacement for Every Responsive Unit

REM responds to root font-size changes, not automatically to screen width. Some layouts need percentages, viewport units, flexible grid sizing, or media queries as well.

For dimensions that need to be expressed relative to a containing size, try the PX to Percentage Converter instead.

Helpful Tips and Conversion Limitations

Keep these points in mind when converting rem values:

  • Check the root font size before working from a conversion table.
  • Use decimal rem values where appropriate, such as 0.875rem for 14px at a 16px root.
  • Avoid unnecessary rounding when comparing precise CSS values.
  • Remember that a calculated pixel equivalent describes a CSS length, not the exact physical size of text glyphs.
  • Preview the actual website if you’re checking text wrapping, component dimensions, or layout behavior.

This converter calculates numerical equivalents using the root size you enter. It does not inspect your website’s stylesheet, detect its computed font size automatically, or preview how a layout will render.

For a positive root font size and valid numerical inputs, the multiplication itself is straightforward. The usefulness of the result depends on choosing the correct root font size for your project.

Convert Your REM Values to Pixels

Use the REM to PX Converter whenever you need to check the pixel size of a rem-based CSS measurement. Enter your rem value, confirm the root font size, and press Calculate to see the equivalent pixel value.

For common measurements, the conversion table provides a quick reference. For custom font-size settings, use the calculator above and copy the result when you’re ready.

Frequently Asked Questions

1. How many pixels is 1rem?

1rem equals 16px when the root font size is 16px. If the root size is 18px, 1rem equals 18px instead. The actual conversion depends on the computed font size of the document’s root element.

2. How do I convert REM to PX in CSS?

Multiply the rem value by the root font size in pixels. For example, with a 16px root, 1.5rem × 16 = 24px. Enter these values into the REM to PX Converter to calculate the equivalent without doing the multiplication manually.

3. How many pixels is 0.875rem?

At a 16px root font size, 0.875rem equals 14px. With a 20px root, it equals 17.5px. Always use the appropriate root size for your project.

4. What is 1.25rem in pixels?

1.25rem equals 20px at a 16px root font size because 1.25 × 16 = 20. If the root size is 18px, the same rem value equals 22.5px.

5. Is REM always based on 16px?

No. REM is based on the root element’s computed font size, which is commonly 16px by default. CSS declarations and user font-size settings can change that value.

6. Why use REM instead of PX in CSS?

REM makes it possible to express font sizes and spacing relative to one shared root font size. This can simplify size systems and help dimensions respond to root font-size changes. However, using rem alone does not automatically make a layout responsive.

7. Can this converter change PX back to REM?

The tool shown here converts rem values into pixels. To convert in the opposite direction, divide the pixel value by the root font size. The website also provides a separate PX to REM Converter for that task.

Useful Pixel & Web Design Conversion Tools

If you are using the REM to PX Converter, these related tools can help with responsive sizing, pixel conversion, screen measurements, and CSS layout calculations.