PX to REM Converter

Live

PX to REM Converter converts pixels to rem, em and points for CSS, using any base font size.

Runs in your browser: what you enter is processed on your device and not uploaded to MyToolDock.

1 rem is the root font size, 16 px in most browsers unless the page or the user changes it. Em is relative to the parent element, so it equals rem only when the parent is the same size as the root. Points use the CSS definition of 1 pt = 4/3 px.

What is PX to REM Converter?

PX to REM Converter converts pixels to rem, em and points for CSS, using any base font size. Rem is relative to the root font size, which a user can change in their browser. Em is relative to the parent element, so the em value shown is only right when the parent is the same size as the root.

How It Works

  1. Enter a value in px, rem or pt and the base font size, 16 px by default in the input fields on this page.
  2. Press the button to run PX to REM Converter.
  3. Read the value in rem, pixels and points, and as a percent of the base size in the result area, and copy or download it.

Common Uses

Good to Know

If your site sets html { font-size: 62.5% }, use a base of 10 px.

In more detail

Type a value, choose whether it is in pixels, rem or points, and set the base font size. The rem, pixel and point values update when you press Convert.

Rem is the pixel value divided by the root font size. With the usual base of 16 px, 24 px is 1.5 rem, and 12 pt is 16 px.

Worked example

About 250 random values, units and base sizes were compared with exact fraction arithmetic, including negative values and fractional bases. 16 px at a base of 16 gives 1 rem, and 12 pt gives 16 px.

Limits

Rem follows the root font size, which users can change in their browser settings. Em depends on the parent element, so the em value is only the same as rem when the parent is the root size.

Frequently Asked Questions

What is the difference between rem and em?

Rem is relative to the root element and em is relative to the element's parent, so em values can compound inside nested elements.

Why is the base 16 px?

It is the default font size in most browsers. If your CSS changes the root size, enter that value instead.

Are my numbers uploaded?

No. The calculation runs in your browser.

What does PX to REM Converter do?

PX to REM Converter converts pixels to rem, em and points for CSS, using any base font size. Rem is relative to the root font size, which a user can change in their browser. Em is relative to the parent element, so the em value shown is only right when the parent is the same size as the root.

What do I need to enter in PX to REM Converter?

A value in px, rem or pt and the base font size, 16 px by default.

Is my data private in PX to REM Converter?

Your numbers stay in your browser and are not uploaded.

Is MyToolDock PX to REM Converter free to use?

Yes, MyToolDock PX to REM Converter is 100% free with no registration, subscriptions, or limits. All features are fully unlocked.

Related Tools

Area Unit Converter Base64 to Text Converter Binary to Octal Converter Binary to Text Pounds to Kilograms Converter RGB to Hex

More Converter Tools guides

More in Converter Tools · Browse all tools

Developer Scratchpad

Copied to clipboard!