ToolPal

Pixel ↔ REM/EM Converter

Convert CSS pixel values to rem and em units, and vice versa. Includes a reference conversion table.

px
px
e.g. 24

Common Conversions (base 16px)

PXREM
8px0.5rem
12px0.75rem
14px0.875rem
16px1rem
18px1.125rem
20px1.25rem
24px1.5rem
32px2rem
48px3rem
64px4rem

How to Use

Convert CSS pixel values to rem and em units, and vice versa. Includes a reference conversion table.

  1. 1In the 'Settings' section at the top, verify or adjust the base font size (default 16px) to match your project's root font size set on the html element.
  2. 2To convert px to rem or em: click the 'PX → REM/EM' tab, type a pixel value in the input field, and both rem and em results appear instantly below.
  3. 3Each result card shows the conversion formula (e.g. 24px ÷ 16 = 1.5rem) — useful for understanding the math or pasting into code comments.
  4. 4To convert rem or em back to px: click the 'REM/EM → PX' tab, enter a rem or em value, and the pixel equivalent is shown.
  5. 5Use the 'Common Conversions' table at the bottom for quick reference — it lists 10 standard pixel values and their rem equivalents at base 16px.

Key Features

  • Bidirectional conversion — px to rem/em and rem/em back to px
  • Configurable base and parent font sizes — match your actual project settings
  • Live formula display — shows the exact math for each conversion
  • One-click copy for rem, em, and px results
  • Reference conversion table — 10 standard pixel values at base 16px for quick lookup

Frequently Asked Questions

Learn More