Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

Px, Em conversion tool


May 04, 2021 HTML Reference Manual


Table of contents


Px, Em conversion tool

The following tools provide conversion tools for em and px.

  • First input box: Set the default font pixel for a web page (usually 16px)
  • Second input box: Enter a pixel value that converts px to em.
  • Third input box: Enter the em (relative length unit) value to convert em to px

Set the default pixel size:

Px

PX is converted to EM:
Px

EM converted to PX:
Em


Conversion results:



The size of the text font

The following table lists conversion data for px and em and the percentage of web fonts when the default value for web fonts is 16px.

Px Em Percentage
5px 0.3125em 31.25%
6px 0.3750em 37.50%
7px 0.4375em 43.75%
8px 0.5000em 50.00%
9px 0.5625em 56.25%
10px 0.6250em 62.50%
11px 0.6875em 68.75%
12px 0.7500em 75.00%
13px 0.8125em 81.25%
14px 0.8750em 87.50%
15px 0.9375em 93.75%
16px 1.0000em 100.00%
17px 1.0625em 106.25%
18px 1.1250em 112.50%
19px 1.1875em 118.75%
20px 1.2500em 125.00%
21px 1.3125em 131.25%
22px 1.3750em 137.50%
23px 1.4375em 143.75%
24px 1.5000em 150.00%
25px 1.5625em 156.25%

Related articles