PX to REM & Type Scale

Convert between PX, REM, EM, and PT units and generate harmonious CSS typographic scales.

Root Font Size:

Bidirectional Unit Converter

PX ↔ REM / PT / %

Quick Reference Table

Common Spacing & Font Sizes (Base 16px)

Pixels (px)REMPercent (%)Action
4px0.25rem25%
8px0.5rem50%
10px0.625rem63%
12px0.75rem75%
14px0.875rem88%
16px1rem100%
18px1.125rem113%
20px1.25rem125%
24px1.5rem150%
28px1.75rem175%
32px2rem200%
36px2.25rem225%
40px2.5rem250%
48px3rem300%
64px4rem400%
72px4.5rem450%
96px6rem600%

Modular Typography Scale

Type Hierarchy & CSS Custom Properties

--text-4xl 3.052rem (48.8px)
Hero display headline
--text-3xl 2.441rem (39.1px)
Page feature heading
--text-2xl 1.953rem (31.3px)
Section title
--text-xl 1.563rem (25.0px)
Subsection heading
--text-lg 1.250rem (20.0px)
Lead paragraph & card title
--text-base 1.000rem (16.0px)
Base body paragraph typography
--text-sm 0.800rem (12.8px)
Secondary UI interface copy
--text-xs 0.640rem (10.2px)
Caption & metadata label
CSS Custom Properties (:root)
:root {
  font-size: 16px;
  --text-xs: 0.640rem; /* 10.2px */
  --text-sm: 0.800rem; /* 12.8px */
  --text-base: 1.000rem; /* 16.0px */
  --text-lg: 1.250rem; /* 20.0px */
  --text-xl: 1.563rem; /* 25.0px */
  --text-2xl: 1.953rem; /* 31.3px */
  --text-3xl: 2.441rem; /* 39.1px */
  --text-4xl: 3.052rem; /* 48.8px */
}

Related in Images & Design

More tools in this category

View all tools →