PX to Percent Converter
Convert a pixel font size into the percentage equivalent for any parent size, with the full percentage scale.
Browsers default to 16px. Use 10 if your CSS sets html { font-size: 62.5% }.
About this conversion
The same value at other root sizes
| Root size | Result |
|---|
Common conversions at 16 px
| px | % |
|---|
What It Does
Percentages are the oldest way to size text relatively in CSS, and they behave exactly like em: 100% is the parent element's font size. This tool takes a pixel value from a design and gives you the percentage that reproduces it, for whatever parent size you are working against. Percentages are still the safest unit for the root element itself — html { font-size: 100% } respects whatever default the reader has chosen, which a pixel value would silently override.
When to Use It
- You are converting a design handed over in pixels (px) into a stylesheet that uses percent (%) for accessibility.
- You inherited a codebase that mixes units and you need the % equivalent of an existing px value.
- You want to check what a px value becomes when the user changes their browser's default font size.
- You are writing a design-token scale and need the same step expressed in both units.
Worked Examples
24
At a 16px parent, 24px is 150% — the usual step for a section heading.
16
16px is exactly 100% at the browser default. This is the value to keep on the root element.
12
12px is 75% of a 16px parent. Small print, and about as low as body text should ever go.
Features
How to Use
1. Enter the pixels (px) value you want to convert. 2. Set the root (or parent) font size the value should be measured against — 16px is the browser default. 3. Read the percent (%) result, or copy the whole conversion table for the sizes you use.
Common Mistakes
- Assuming the conversion is fixed. 100% equals the parent element's font size, not a fixed number of pixels — the same px value converts differently depending on that size.
- Confusing em with rem. `em` is relative to the *parent* element's font size and therefore compounds when nested; `rem` is always relative to the root element and does not.
- Setting a px font size on the root element. That overrides the user's browser font-size preference, which defeats the accessibility reason for using relative units at all.
- Rounding too early. Keep the fraction (1.375rem, not 1.4rem) — the browser resolves sub-pixel values fine and the rounding error compounds across a scale.
Frequently Asked Questions
Related Tools
The conversion runs entirely in your browser. Nothing is uploaded and nothing is stored.