Pixel to Em Converter — fast
Convert pixel values to em/rem units for CSS.
Typically 16px (browser default)
Pixels
16.00px
Em / Rem
1.0000em
Base font size
16px
How to use Pixel to Em Converter
Enter Your Pixel Value
Type the pixel number into the 'Pixel (px)' input field at the top of the converter. For example, enter '16' to convert 16 pixels. The field accepts whole numbers and decimals.
Set the Base Font Size
Input your base font size in the 'Base Font Size (px)' field. Default is 16px (browser standard). Adjust this if your project uses a different base size like 14px or 18px.
Choose Em or Rem Unit
Click the toggle between 'Em' and 'Rem' buttons below the input fields. Select 'Em' for relative to parent element or 'Rem' for relative to root element.
View Instant Conversion Result
The converted value appears immediately in the 'Result' box below. Copy the result by clicking the 'Copy to Clipboard' button next to the output value.
Paste into Your CSS Code
Paste the copied em/rem value directly into your CSS file, HTML style tags, or CSS-in-JS framework. The conversion is complete and ready to use.