Convert between pixels and REM with custom root font-size
| PX | REM |
|---|
Converting between pixels and REM units is a common task for web developers building responsive and accessible designs. This tool handles both directions instantly.
Step 1: Choose your conversion direction. Use the tabs at the top to switch between PX→REM and REM→PX modes. In PX→REM mode, enter pixel values and get REM output. In REM→PX mode, enter REM values and get pixel output.
Step 2: Set your root font-size. The default is 16px (browser standard), but you can change it to match your project's root font-size. Use the preset dropdown for common values (10px, 14px, 16px, 18px, 20px) or type a custom value.
Step 3: Enter your value. Type the number you want to convert. The result updates in real-time as you type. Fractional values like 12.5px or 0.75rem are fully supported.
Step 4: Reference the quick table. Below the converter, a reference table shows common pixel values and their REM equivalents for the current root font-size. This is handy for quick lookups during development.
Pro tip: Many developers set their root font-size to 62.5% (10px) so that REM values map directly to pixels — 1.6rem = 16px, 2.4rem = 24px, etc. Try it with the 10px preset!