Convert between px, rem, em, pt, and % using a configurable base font-size
| Unit | Value |
|---|
| px | rem |
|---|---|
| 12px | 0.75rem |
| 14px | 0.875rem |
| 16px | 1rem |
| 18px | 1.125rem |
| 24px | 1.5rem |
| 32px | 2rem |
To convert CSS units, set your base font size, enter a value, and pick its unit, and the tool shows the equivalent in px, rem, em, pt, and percent. At a 16px base, 24px equals 1.5rem. It runs in your browser and is free with no signup.
CSS offers several length units. px (pixels) is an absolute unit. rem is relative to the root font-size, and em is relative to the current element's font-size. pt (points) is a print-oriented unit where 1pt equals 1/72 of an inch, and CSS defines 96px per inch, so 1pt = 96/72 = 1.3333px. Percentages are relative to a base value.
This converter uses a single configurable base font-size (default 16px). In this simplified model, 1rem, 1em, and 100% all equal the base. For example, at a 16px base, 24px = 1.5rem and 12pt = 16px.
Using relative units like rem instead of fixed pixels helps your typography scale with the user's browser settings, improving accessibility.