Unit conversion 43

PX·REM converter

Convert pixels and rem values according to the standard font size.

Input

The example value has been entered. Check it immediately or change the value.

Minimum 0.01

Run with Ctrl or ⌘ + Enter

Input is processed in the browser. Refreshing returns a sample value.

Result

Check or change the value using the example value result.

Enter the actual root font size directly. The default example is 16px.

Share result

Share the tool link and result text together. No URL is included in the result. Check the below content and then share it.

Calculation·conversion criteria

Convert px and rem according to the root font size.

rem = px ÷ root font size px

Input example

16px / standard: 16px = 1rem

If the root font is 16px, 24px is 24÷16=1.5rem. If the root is 20px, the same 24px is also 1.2rem, so check the actual setting.

How to use

  1. Use the provided example value or replace the value, root font size (px), and input unit field.
  2. Click Verify result and check the following result.
  3. Result can be copied if needed.

Frequently Asked Questions

Are rem and em the same unit?

rem is based on the font size of the root element. em can vary depending on the property and element font size. Do not convert rem results from this tool directly to em.

Calculation criteria and reference materials

Verification of calculation criteria: · Calculation·verification principles · Report errors