PX to REM Converter Online
Convert pixels to CSS REM units and vice versa with configurable root font size. Includes batch CSS snippet parser and Tailwind cheat sheet.
font-size: 1.5rem; /* 24px */Tailwind CSS & Standard REM Reference Table (16px Base)
| Tailwind Class | Pixels (px) | REM Value | Common Usage |
|---|---|---|---|
| text-xs | 12px | 0.75rem | Badges, captions, footnotes |
| text-sm | 14px | 0.875rem | Secondary text, form labels |
| text-base | 16px | 1.0rem | Body copy, standard inputs |
| text-lg | 18px | 1.125rem | Subheaders, lead paragraphs |
| text-xl | 20px | 1.25rem | H3 titles, cards |
| text-2xl | 24px | 1.5rem | H2 section headings |
| text-3xl | 30px | 1.875rem | H1 page headers |
| text-4xl | 36px | 2.25rem | Hero display titles |
Complementary Developer Utilities
Base64 Encoder & Decoder
Encode binary assets and SVG icons into base64 data URIs.
Epoch Timestamp Converter
Convert Unix epoch timestamps to human dates and ISO 8601 strings.
Case Converter Online
Format variable names into kebab-case, camelCase, and snake_case.
URL Slug Generator
Create clean, SEO-optimized URL permalinks from any heading.
Frequently Asked Questions
How do I calculate REM from PX?
The formula is: REM = Pixels / Base Font Size. With the standard browser base of 16px, 24px / 16 = 1.5rem.
Why should I use REM instead of PX in modern web design?
REM units scale proportionally with the user's browser font size settings, ensuring accessible layouts for visually impaired users and preventing broken interfaces when users increase text size.
What is the Tailwind CSS default rem scale?
Tailwind CSS uses a 16px base: text-xs is 0.75rem (12px), text-sm is 0.875rem (14px), text-base is 1rem (16px), text-lg is 1.125rem (18px), text-xl is 1.25rem (20px), and text-2xl is 1.5rem (24px).