PX to REM & Line Height
- Files never leave your device
- Runs in your browser
- Free, no sign-up, no watermark
Converter
Type in any box, the rest follow.Preview
Typography is the craft of making language visible. A good line length and generous leading let the eye glide from one line to the next without losing its place.
Common sizes
Click a row to load it into the converter.| px | rem | em | pt | vw | Line-height |
|---|---|---|---|---|---|
| 10 | 0.625 | 0.625 | 7.5 | 0.694 | 1.7 |
| 12 | 0.75 | 0.75 | 9 | 0.833 | 1.65 |
| 13 | 0.8125 | 0.8125 | 9.75 | 0.903 | 1.63 |
| 14 | 0.875 | 0.875 | 10.5 | 0.972 | 1.6 |
| 15 | 0.9375 | 0.9375 | 11.25 | 1.042 | 1.57 |
| 16 | 1 | 1 | 12 | 1.111 | 1.55 |
| 18 | 1.125 | 1.125 | 13.5 | 1.25 | 1.52 |
| 20 | 1.25 | 1.25 | 15 | 1.389 | 1.5 |
| 24 | 1.5 | 1.5 | 18 | 1.667 | 1.4 |
| 28 | 1.75 | 1.75 | 21 | 1.944 | 1.32 |
| 32 | 2 | 2 | 24 | 2.222 | 1.25 |
| 36 | 2.25 | 2.25 | 27 | 2.5 | 1.23 |
| 40 | 2.5 | 2.5 | 30 | 2.778 | 1.2 |
| 48 | 3 | 3 | 36 | 3.333 | 1.15 |
| 56 | 3.5 | 3.5 | 42 | 3.889 | 1.13 |
| 64 | 4 | 4 | 48 | 4.444 | 1.1 |
| 72 | 4.5 | 4.5 | 54 | 5 | 1.09 |
| 96 | 6 | 6 | 72 | 6.667 | 1.05 |
Type scale
Fluid type with clamp()
Text grows smoothly between two viewport widths and stays fixed outside them.
font-size: clamp(1rem, 0.8239rem + 0.7512vw, 1.5rem);
The quick brown fox
How to use PX to REM & Line Height
Convert between px, rem, em, pt, %, and vw using your own root and parent font sizes, and get a recommended line height and line length for any size. The page also builds a modular type scale and a fluid clamp() rule for responsive text.
- 1
Set the Root font size, Parent font size, and Viewport width under Context.
- 2
Type a value into any box in Converter; the other units follow.
- 3
Read the Recommended line-height and Comfortable line length for that size.
- 4
Optional: build a Type scale from a ratio, or a Fluid type with clamp() rule, and copy the CSS.
Frequently asked questions
How many pixels is 1rem?
1rem equals the root (<html>) font size, which browsers set to 16 px by default. Change Root font size if your site uses a different base.
What's the difference between rem and em?
rem is relative to the root font size; em and % are relative to the parent element's font size. Set Parent font size to convert em correctly.
How is the line height chosen?
It follows common typographic practice: about 1.5 for body text and tighter leading for large headings. A version snapped to a 4 px grid is shown as well.
What does the clamp() generator do?
It writes a font-size that grows smoothly between a min and max size across two viewport widths and stays fixed outside them. Simulate viewport width shows the result at any width.
Can I convert points for print?
Yes. pt uses the CSS ratio of 72 pt to 96 px, so 12 pt equals 16 px.