PX to REM Converter
In CSS, rem stands for "root em." It is a measurement unit based on the font size of the root element (
<html>
), which is why many developers use rem as a font size. This PX to REM
Converter tool helps
convert PX values to REM units in just a few seconds. You can use the converter tool below anytime,
anywhere, completely free of charge.
Size Preview
The quick brown fox jumps over the lazy dog
This simple tool not only converts but also displays the value in a preview size on the website. This
helps developers easily select the correct REM
value for font size. After entering the
value and
clicking the convert button, the font size in the preview will automatically adjust.
How to Use PX to REM Converter
Using the px to rem Converter is very simple. Just follow the steps below:
- Step 1: Enter base value.
- Step 2: Input the PX value you want to convert.
- Step 3: Press enter key or click the convert button to get it's REM unit.
PX to REM Conversion Table Chart
Here, in addition to the conversion tool, there is also a table list of commonly used PX
values converted
to REM
for quick results. Many conversions may not be available in this table, so for
those, you can use
the converter tool to manually find the unit value.
Pixels (px) | REM |
---|
How This Conversion Works
The conversion from PX to REM is done by dividing the pixel value by the base font size. The base font size is usually set to 16px by default in most browsers. For example, if you have a pixel value of 32px and a base font size of 16px, the conversion would be 32 / 16 = 2rem.
PX to REM Formula:
rem = px / font-size (default is 16px)
In summary, this simple mathematical formula is used as the backend logic for the converter. It helps
adjust the REM font size, which can be used for HTML element tags like <main>
,
<header>
, <footer>
, <article>
,
<div>
, <nav>
, etc., to define their font sizes.