A font size converter translates typographic measurements between the units used in CSS and print design: px, pt, em, rem, vw, and %. Enter any value below, pick its unit, and see all equivalents instantly — plus a live text preview and CSS snippet you can copy directly into your stylesheet.
Font Size Input
Quick sizes
Settings
All Conversions
Live Text Preview
CSS Snippet
Responsive Type Scale Generator
Enter a base size and ratio to generate a full typographic scale
| Step | px | pt | rem | Preview |
|---|
CSS custom properties for your design system
Common Font Sizes Reference
| Use | px | pt | rem | Notes |
|---|---|---|---|---|
| Caption / Fine print | 10 | 7.5 | 0.625 | Smallest readable |
| Small text / Label | 12 | 9 | 0.75 | UI labels, footnotes |
| Secondary text | 14 | 10.5 | 0.875 | Captions, metadata |
| Body text default | 16 | 12 | 1.0 | Browser default |
| Large body text | 18 | 13.5 | 1.125 | Long-form reading |
| H3 / Lead text | 20 | 15 | 1.25 | Section subheading |
| H2 | 24 | 18 | 1.5 | Article subheading |
| H1 (small) | 32 | 24 | 2.0 | Page title |
| H1 (large) | 48 | 36 | 3.0 | Hero heading |
| Display / Hero XL | 64 | 48 | 4.0 | Marketing hero |
Click any row to load that size into the converter above. All rem values assume 16px base.
How to Use This Font Size Converter
Choosing the right CSS unit for font sizes is one of the most practical decisions in front-end development. The wrong unit leads to inaccessible typography, broken layouts at unusual zoom levels, or designs that look great in Figma but don't translate well to a browser. This font size converter gives you instant equivalents across all six common CSS units so you can pick the right one for your context.
Step 1: Enter Your Font Size
Type any numeric value in the input box and select its unit from the dropdown — px, pt, em, rem, %, or vw. All other unit equivalents update immediately in the conversion cards below. You can also click any conversion card to make that unit the active input, which is useful when you want to start from a specific rem or pt value.
Step 2: Adjust Base Size and Viewport Width
By default the tool assumes a 16px root font size — the browser default. If your project uses html { font-size: 10px; } (a common Tailwind-free pattern for easy math) or any other custom root size, change the "Base font size" field. The rem and em equivalents will recalculate automatically. Similarly, vw conversions depend on the viewport width — set the "Viewport width" field to match your design breakpoint for an accurate pixel equivalent.
Step 3: Preview the Size Visually
The live text preview renders sample text at the exact computed pixel size. This is especially helpful when working with very small captions (10–12px) or large display headings (48–64px) where numbers alone don't give you a feel for the visual weight. You can change the preview text to match your actual content — for example, paste your real heading text to see exactly how large it will look.
Step 4: Copy the CSS Snippet
The CSS snippet shows font-size declarations in all six units simultaneously so you can pick the one you need and paste it directly into your stylesheet. Click "Copy CSS" to copy the entire block, or simply select the line you want. The CSS uses the exact values shown in the conversion cards, rounded to four decimal places for accuracy.
Step 5: Generate a Typographic Scale
The type scale generator creates a harmonically proportioned set of font sizes from a base size and a multiplier ratio. Common ratios like the Perfect Fourth (1.333) or Golden Ratio (1.618) produce scale steps that feel visually balanced when used together for headings, subheadings, body text, and captions. Enter your base size, choose a ratio, and the tool generates a full scale from three steps below the base up to five steps above, with px, pt, and rem equivalents for each step. Copy the output as CSS custom properties (--font-size-sm, --font-size-base, etc.) ready to paste into your :root block.
Which CSS Font Size Unit Should I Use?
Use rem for most font sizes — it's relative to the root, scales with user preferences, and avoids the cascading compounding of em. Use em only when you intentionally want an element to scale relative to its parent (e.g., margin or padding on a component). Use px for fixed UI elements like icons or borders where exact sizing is critical. Use pt only for print stylesheets. Use vw for fluid display headlines that should grow with the viewport, often combined with a clamp() function to set minimum and maximum bounds.
Frequently Asked Questions
Is this font size converter really free?
Yes, this font size converter is completely free to use. There is no signup, no account, and no limits. All conversions happen instantly in your browser.
Is my data safe when using this tool?
Yes, all calculations run entirely in your browser. No data is ever sent to a server. Your inputs stay completely private on your device.
What is the difference between px, pt, em, and rem?
px (pixels) are absolute screen units. pt (points) are a print unit equal to 1/72 of an inch, where 12pt = 16px. rem (root em) is relative to the root HTML element's font size (typically 16px). em is relative to the current element's parent font size, which can cascade and compound in nested elements.
How do I convert px to rem in CSS?
Divide the pixel value by the root font size (typically 16px). For example, 24px ÷ 16 = 1.5rem. This tool does that calculation automatically. You can also change the base size if your project uses a non-standard root font size like 10px or 18px.
Why should I use rem instead of px for font sizes?
rem units respect user browser font size preferences, making your site more accessible. When a user increases their browser default font size, rem-based text scales accordingly while px-based text stays fixed. rem also makes it easy to scale the entire typographic system by changing just the root font size.
What is vw in CSS font size?
vw stands for viewport width — 1vw equals 1% of the browser window's width. Using vw for font sizes creates fluid typography that scales with the viewport. For example, at a 1920px viewport, 1vw = 19.2px. This tool lets you set the viewport width to preview accurate vw conversions.
What is a typographic scale and how do I use it?
A typographic scale is a set of harmonically related font sizes based on a ratio. Common ratios include Minor Third (1.2), Major Third (1.25), Perfect Fourth (1.333), and Golden Ratio (1.618). Starting from a base size and multiplying by the ratio generates sizes for headings, subheadings, body text, and captions that feel visually consistent.
How many points is 16px?
16px equals 12 points (pt) at standard screen resolution (96 DPI). The conversion is: pt = px × 0.75, so 16 × 0.75 = 12pt. Conversely, 1pt = 1.333px.