snaptools
PX to REM Converter
Pixels (px)
REM (rem)
EM (em)
Points (pt)
Enter a value to convert between CSS units
// about this tool

PX to REM Converter Online

Updated 2026-07-09

Convert px to rem (and em and pt) online for free. Enter a value, set your root font size, and SnapTools shows it in every CSS unit at once, with one-click copy. Everything runs in your browser, so nothing is uploaded.

Designers hand off pixels, but rem-based CSS scales with the user's font-size preference and is better for accessibility. This converter does the px ÷ root-size math for you — in both directions — so your stylesheet stays consistent without a calculator.

// how to use

  1. 1 Enter a value and pick its unit (px, rem, em, or pt).
  2. 2 Set your root font size if it's not the default 16px.
  3. 3 Read the value in every unit and copy the one you need.

// examples

24px to rem (root 16px)
Input
24 px
Output
1.5rem
2rem to px (root 16px)
Input
2 rem
Output
32px

// common uses

Converting a design's px values to rem for CSS Building accessible, scalable typography Matching print pt sizes to screen px Recomputing units when changing the root font size

// faq

1rem equals your root font size (16px by default), so rem = px ÷ root size. For example, 24px ÷ 16 = 1.5rem. Change the root size field to match your project's html font-size.
rem is always relative to the root element's font size, while em is relative to the nearest parent's font size. Against a single base value they compute the same, which is what this tool shows.
Points (pt) appear in print styles and design tools. 1pt is 1/72 inch and 1px is 1/96 inch, so 16px equals 12pt — handy when moving between print and screen.
rem scales with the user's preferred font size, which is better for accessibility, so it's preferred for font sizes and spacing. px is fine for borders and fixed details.
No — the conversion runs in your browser, so nothing leaves your machine.

↳ Curious to go deeper? Read the px vs rem in CSS: which to use and how to convert guide →

Use this via API

Get a free API key →
curl -X POST https://snaptools.dev/api/v1/tools/px-to-rem \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"value":"24 px"}'
Esc
↑↓ navigate open Esc close