🔤 Typography Unit Converter — px, rem, em, pt

Typography Unit Converter px ⇔ rem ⇔ em ⇔ pt ⇔ All 9 CSS Units — Live Bidirectional

Type any typography value in any unit field and all 9 units update instantly. Converts between px (pixels), rem (root em), em (parent em), pt (points), pc (picas), in (inches), cm, mm, and % of base. Set your project’s root font size (default 16px) to get project-accurate values. See a live text preview rendered at your exact converted size. Generate a modular type scale (Minor Third through Golden Ratio) with all values across px, rem, and pt. View the complete reference table for common px values and copy any row. Copy-ready CSS snippets. WCAG text size accessibility indicator. Tailwind CSS class mapping in the type scale. All calculations are browser-side — nothing sent to any server.

9 units live bidirectionalLive text previewModular type scaleReference table + CSS snippet
AdSense — 728×90 Leaderboard
🔤 Typography Unit Converter

Type in Any Unit — All 9 Update Instantly

Bidirectional. Edit any field and everything recalculates. Adjust base font size to match your project.

px
px
Base size presets
Absolute units (not affected by user preferences)
px
pt
pc
in
cm
mm
Relative units (scale with context)
rem
em
%
Common sizes
All units at a glance
Pixels
Points
Picas
Inches
Centimetres
Millimetres
Root em (rem)
Em (parent)
Percent
👁️ Live text preview

The quick brown fox jumps over the lazy dog. Aa Bb Cc

CSS snippet

      
🎵 Modular type scale generator
px
StepPreviewpxremptTailwind
Reference table — common px values across all units
pxremptpc%Copy
AdSense — 728×90 Leaderboard

Typography unit quick reference

🧮
rem ↔ px
At 16px base
Browser default
0.75rem12px
0.875rem14px
1rem16px
1.5rem24px
2rem32px
3rem48px
🖨️
pt ↔ px
At 96 DPI CSS
Print units
9pt12px
10pt13.3px
12pt16px
14pt18.7px
18pt24px
24pt32px
📱
When to use each
Best practices
CSS recommendations
remFont sizes, spacing
emComponent internals
pxBorders, shadows
ptPrint stylesheets
%Widths, flex items
♥️
WCAG Text Sizes
Accessibility thresholds
Contrast requirements
Normal text4.5:1 contrast
Large (24px+)3:1 contrast
Bold large (18.5px+)3:1 contrast
Resize to 200%Must not break layout
User prefUse rem not px
🎨
Check your text colour contrast for WCAG compliance?
The free Color Contrast Checker checks your foreground and background colours against WCAG AA and AAA at any text size — and suggests the nearest passing colour automatically.
Color Contrast Checker →
⭐ Ratings

Rate this tool

4.9
★★★★★
Based on 44,800 ratings
5
10,120
4
435
3
218
2
109
1
0
Was this your design photo guide helpful?
Thank you! G'day!
CSS Typography Units

px, rem, em, pt Explained — The Complete Guide for Designers & Developers

CSS offers two categories of length units: absolute units that have a fixed physical size regardless of context, and relative units that scale based on a reference value. For typography — font sizes, line heights, letter spacing — the choice between px, rem, em and pt has significant consequences for accessibility, responsiveness, and maintainability. Getting this right is one of the most important decisions in a front-end design system.

The four most important typography units

📱
px (pixels) — absolute, fixed, does not respect user preferences — A CSS pixel is defined as 1/96 of an inch at the CSS reference pixel density. px is absolute — 16px is always 16px regardless of what font size the user has set in their browser preferences. This makes px problematic for body text: if a user increases their browser font size to 20px for readability, all px-based text stays at its original size, failing WCAG criterion 1.4.4 (Resize Text). Use px for borders, shadows, specific icon sizes, and media query breakpoints where fixed values are intentional.
🧮
rem (root em) — relative to root, scales globally, accessibility-safe — 1rem equals the font size of the root <html> element, which defaults to 16px in all major browsers but can be changed by the user. rem is predictable and globally consistent — 1rem always means the same thing anywhere on the page, regardless of nesting. This makes it ideal for font sizes, spacing (padding, margin, gap), and layout dimensions. When users adjust their browser default font size, all rem-based values scale proportionally — the page reflows correctly and WCAG 1.4.4 is satisfied.
🔀
em — relative to parent, compounds in nesting — 1em equals the font size of the element’s parent. Unlike rem, em is contextual and compounds when elements are nested: a child at 1.5em inside a parent at 1.5em will render at 2.25x the root size (1.5 × 1.5). This compounding makes em unpredictable for global typography but powerful for self-contained components where you want all internal spacing to scale together with the component’s font size. Example: a button at 0.875em has its padding defined in em, so if you resize the button text, all its proportions scale together.
🖨️
pt (points) — print unit, 1/72 inch, used in print stylesheets — Points are the traditional typographic unit used in print design (Word, InDesign, Illustrator). At the CSS standard of 96 DPI: 1pt = 96/72 = 1.333px. Points appear in CSS print stylesheets (@media print), PDF generation tools (wkhtmltopdf, Puppeteer), and when designers specify sizes from print tools. Standard print body text is 10–12pt = 13.3–16px. Do not use pt for screen typography — use rem instead.
Conversion Formulas

px to rem, pt, em — Exact Conversion Formulas

Convert fromFormulaExampleNotes
px to remrem = px / root-size16px / 16 = 1remRoot size = 16px (browser default)
rem to pxpx = rem x root-size1.5rem x 16 = 24pxMultiply by root font size
px to emem = px / parent-size24px / 16 = 1.5emParent size matters
em to pxpx = em x parent-size1.25em x 16 = 20pxContext-dependent
px to ptpt = px x (72/96)16px x 0.75 = 12ptAt CSS 96 DPI standard
pt to pxpx = pt x (96/72)12pt x 1.333 = 16pxAt CSS 96 DPI standard
px to pcpc = px / 1632px / 16 = 2pc1 pica = 12 points = 16px
px to inin = px / 9696px / 96 = 1in96 CSS pixels per inch
px to cmcm = px / 37.79537.795px = 1cm96/2.54 = 37.795
px to mmmm = px / 3.77953.7795px = 1mm96/25.4 = 3.7795

px to rem reference table (base 16px)

pxremptTailwind classUsage context
10px0.625rem7.5pttext-xs (approx)Fine print, captions
12px0.75rem9pttext-xsSmall labels, footnotes
13px0.8125rem9.75ptUI secondary text
14px0.875rem10.5pttext-smSecondary body text
16px1rem12pttext-baseBody text (standard)
18px1.125rem13.5pttext-lgLarge body / lead text
20px1.25rem15pttext-xlLarge body / subheading
24px1.5rem18pttext-2xlH3 / card title (WCAG large)
30px1.875rem22.5pttext-3xlSection heading
36px2.25rem27pttext-4xlH2 / page section
48px3rem36pttext-5xlH1 / hero heading
60px3.75rem45pttext-6xlDisplay heading
72px4.5rem54pttext-7xlPoster / masthead
Accessibility

Typography Units & Accessibility — Why rem Beats px for WCAG

WCAG 2.1 has specific requirements that directly affect which CSS unit you should use for font sizes.

⚠️
WCAG 1.4.4 — Resize Text (Level AA) — Text must be resizable up to 200% without loss of content or functionality. If you set font sizes in px, users who change their browser default font size (the main accessibility mechanism) cannot scale your text — px is immune to browser font size preferences. Setting font sizes in rem automatically passes 1.4.4 because rem scales with the browser default. About two-thirds of users who need larger text use browser font size settings rather than browser zoom.
✔️
WCAG 1.4.3 — Contrast (Level AA) — large text at 24px+ has relaxed requirement — Large text (24px+ regular, or 18.67px+ bold) only needs a 3:1 contrast ratio instead of 4.5:1 for normal text. The live text preview in this tool shows whether your current size qualifies as large text. If you’re using rem sizes, remember to check the rendered px size — a value of 1.5rem = 24px if root is 16px, qualifying as large text, but 1.5rem = 15px if root is 10px, which is normal text requiring 4.5:1.
Best practice: rem for all text, px only for non-text — Use rem for all font sizes, line heights, and spacing. Use px only for values that must not change with text size: 1px borders, box shadows, specific media query breakpoints. This approach ensures your UI scales correctly when users change font size preferences and passes WCAG 1.4.4 automatically. Most modern frameworks (Tailwind CSS, Bootstrap 5, Material Design) have adopted this convention.
Type Scales

Modular Type Scales — Building Harmonious Typography Systems

A modular type scale uses a single ratio to generate all font sizes in a design system. This creates visual harmony — every size is mathematically related to every other. Use the type scale generator above to explore any ratio.

Scale nameRatioCharacterBest for
Minor Second1.067Very subtle, barely noticeable difference between stepsDense UIs, dashboards, data tables
Major Second1.125Subtle, clean, professionalLong-form reading, editorial
Minor Third1.2Gentle, warm, approachableBlog posts, marketing sites
Major Third1.25Clear hierarchy, spaciousSaaS products, landing pages
Perfect Fourth1.333Strong hierarchy, expressivePortfolio sites, bold brands
Augmented Fourth1.414Dramatic, very expressivePosters, hero-led pages
Perfect Fifth1.5Very dramatic, large differencesDisplay-focused pages
Golden Ratio1.618Maximum contrast between stepsShort copy, poster typography
Comparison

LazyTools vs Other px to rem Converters

FeatureLazyToolsremtopx.combug0.compacgie.com
Bidirectional (type any unit)✅ All 9 units⚠ px/rem only✅ 5 units✅ Yes
Live text preview✅ Rendered at exact size❌ No❌ No❌ No
Modular type scale generator✅ 8 scale ratios❌ No❌ No❌ No
WCAG accessibility indicator✅ Size classification + WCAG❌ No❌ No❌ No
CSS snippet generator✅ Copy-ready CSS❌ No✅ Yes❌ No
Tailwind class mapping✅ In type scale❌ No❌ No❌ No
Physical units (pt, pc, in, cm, mm)✅ All 6⚠ pt only⚠ pt only⚠ pt only
No account required✅ Yes✅ Yes✅ Yes✅ Yes
FAQ

Typography Unit Converter FAQ

Divide px by the root font size (default 16px). Formula: rem = px / 16. Examples: 8px=0.5rem, 12px=0.75rem, 16px=1rem, 24px=1.5rem, 32px=2rem, 48px=3rem. Type any px value in the converter above.

Multiply rem by the root font size (default 16px). Formula: px = rem x 16. Examples: 0.5rem=8px, 0.875rem=14px, 1rem=16px, 1.5rem=24px, 2rem=32px, 3rem=48px.

1rem equals 16px at the browser default root font size. If a user changes their browser font size, 1rem changes accordingly — this is what makes rem accessible. At a 10px root (62.5% trick): 1rem=10px.

Multiply px by 0.75 (= 72/96). At CSS 96 DPI: 16px = 12pt, 12px = 9pt, 24px = 18pt, 32px = 24pt. One point = 1/72 inch; one CSS pixel = 1/96 inch.

rem is relative to the root html element — always consistent, does not compound. em is relative to the parent element — compounds in nested elements (1.5em inside 1.5em = 2.25x). Use rem for global typography and spacing; em for self-contained components.

16px in all major browsers (Chrome, Firefox, Safari, Edge). This is why 1rem = 16px by default. Users can change this in browser settings — rem-based designs scale correctly when they do; px-based designs do not.

At 16px base: 1px=0.0625rem, 4px=0.25rem, 8px=0.5rem, 12px=0.75rem, 14px=0.875rem, 16px=1rem, 18px=1.125rem, 20px=1.25rem, 24px=1.5rem, 32px=2rem, 48px=3rem, 64px=4rem. See the full reference table above.

Use rem. rem scales with user browser font size preferences (WCAG 1.4.4 compliance). Use px only for borders, shadows, and elements that must not scale. This is the modern CSS best practice adopted by Tailwind, Bootstrap, and Material Design.

16px = 1rem at the default 16px base. At 10px base (62.5% trick): 16px = 1.6rem. Use the converter above and adjust the base font size to match your project.

Setting html{font-size:62.5%} makes root font size 10px (62.5% of 16px), making rem maths simpler: 1rem=10px, 1.6rem=16px. Set base to 10 in this converter to calculate values for that project setup.

At CSS 96 DPI: 1pt = 1.333px, 1px = 0.75pt. 12pt = 16px (standard body text). Points are primarily used in print stylesheets. 1pt = 1/72 inch; at 96 DPI, 1 inch = 96px, so 1pt = 96/72 = 1.333px.

A sequence of font sizes where each step uses a consistent ratio. Common: Minor Third (1.2x), Major Third (1.25x), Perfect Fourth (1.333x), Golden Ratio (1.618x). The type scale generator above shows 9 steps for any ratio in px, rem and pt.

Multiply em by the parent element’s font size. At 16px parent: 1em=16px, 1.5em=24px, 2em=32px. Set the parent font size in the converter above and type any em value to see the px equivalent.

px: borders, shadows, fixed elements. rem: font sizes, spacing, layouts (responsive and accessible). em: component-internal sizing. pt: print stylesheets and PDF generation. %: width, flex, grid column sizing.

14px = 0.875rem at 16px base (14/16=0.875). This is Tailwind text-sm. At 10px base: 14px=1.4rem. Common secondary text and UI label size.

12px = 0.75rem at 16px base (12/16=0.75) = 9pt for print. At 10px base: 12px=1.2rem. Common for captions, small labels, and secondary text. Below 12px is generally considered too small for body text accessibility.

Related tools

More Free Developer & Design Tools