☰
WintelGuy.com

CSS em / pt / px Converter

Convert text size between em, px, and pt, then preview it with the selected browser-safe font and text styling.

Provide the base text size in px or pt.
Enter the target text size in em, px, or pt.
Select the font for the preview.
Choose the font weight for the preview.
Enter the line height multiplier between 0.5 and 10.
Provide the letter spacing and select its unit.
Choose the text color.
Select the background color.
Type the phrase or sentence to preview in the target size.

 Preview
Base: 1em   16px   12pt
The quick brown fox jumps over the lazy dog.
Target: 2em   32px   24pt
The quick brown fox jumps over the lazy dog.
 Generated CSS
html { font-size: 16px; } .sample-text { font-family: Arial, sans-serif; font-size: 2em; font-weight: 400; line-height: 1.4; letter-spacing: 0em; color: #111111; background-color: #F0F8FF; }

About this CSS em / pt / px Converter

To convert between px or pt and em, you must first select a base size in pixels or points. The target size can then be entered in em, px, or pt.

You can also specify the font family, font weight, line height, letter spacing, text color, and background color for the text preview. To perform conversion, click the Convert button.

The tool shows the base and the target text size values in pt, px and em and also generates a preview of the text along with the matching CSS code shown below the preview. The preview and generated CSS use the converted em value and the selected browser-safe font family and text style.

About CSS Text Size Units

  • One pixel is 1/96 inch, equivalent to 0.75 points.
  • One point is 1/72 inch, equivalent to 4/3 CSS pixels.
  • An em is relative to the font size of the parent element (base size) when used for font-size.
  • A rem is relative to the font size of the root element.

For example:
If the base font size is 16px, then 3 em = 3 * 16px = 48px = 36pt.