User Rating 0.0
Total Usage 0 times
Category CSS Tools
px
Default browser size is usually 16px.
Pixels (Absolute)
px
REM (Root EM)
rem
EM (Relative)
em
Percent
%
Points (Print/Email)
pt
Live Typography Preview
The quick brown fox jumps over the lazy dog. 1234567890
16px / 24px (1.5)
Computed Type Scale (Base: 16px)
PX REM Example Usage
Is this tool helpful?

Your feedback helps us improve.

About

In modern web development, managing typography requires a precise understanding of both absolute and relative units. While pixels (px) offer fixed precision, relative units like rem and em are critical for creating accessible, responsive designs that respect a user's browser settings.

This tool acts as a bridge between design files and code. Unlike simple calculators, it simultaneously synchronizes five distinct CSS units based on your project's Root Base Size. It includes a real-time visual sandbox to verify readability and a dynamic reference scale to assist in defining type systems for design systems.

Accuracy is paramount: calculations use floating-point precision to ensure your layouts remain pixel-perfect across varying viewport widths and resolutions.

css typography web design accessibility unit conversion

Formulas

The conversion logic relies on the relationship between the target size and the Base font size (typically 16px in most browsers).

{
rem = pxBasepx = rem × Base% = rem × 100pt = px × 0.75

Where Base is the root font size defined in the html or parent selector. pt is calculated based on the standard web definition where 1in = 96px = 72pt.

Reference Data

Pixel pxREM remPercent %Point ptTailwind Class
12px0.75rem75%9pttext-xs
14px0.875rem87.5%10.5pttext-sm
16px1rem100%12pttext-base
18px1.125rem112.5%13.5pt-
20px1.25rem125%15pttext-xl
24px1.5rem150%18pttext-2xl
30px1.875rem187.5%22.5pttext-3xl
36px2.25rem225%27pttext-4xl
48px3rem300%36pttext-5xl
60px3.75rem375%45pttext-6xl

Frequently Asked Questions

Most modern web browsers (Chrome, Firefox, Safari) set the default root font size to 16px. If you do not explicitly override this in your CSS (e.g., `html { font-size: ... }`), 1rem will equal 16px. Changing the base size in this tool allows you to work with frameworks that might set the base to 10px (like the old "62.5%" trick).
REM (Root EM) is relative to the root `` element's font size. It is consistent throughout the document. EM is relative to its *immediate parent's* font size. This tool assumes the EM context is the same as the Base Size, but in complex nesting, EM values compound.
Points are primarily a print unit or used in legacy systems. However, they are still critical for HTML Email development, as many email clients (like Outlook) render text using print engines that respect `pt` better than `rem` or `px`.
Yes. If you set your CSS `html { font-size: 62.5%; }`, your base size effectively becomes 10px (62.5% of 16px). Simply change the "Base Size" input in this tool to 10px to calculate values for that setup.