Skip to main content

dvlp.haus

Font Size Converter

Convert between px, rem, em or custom font size types.

pxemremdvlp

px to em/rem conversion

Font conversion table showing the different rem values given standard px font sizes as well as default TailwindCSS class names.
pxem/remTailwindCSS
120.75text-xs
140.875text-sm
161text-base
181.125text-lg
201.25text-xl
241.5text-2xl
301.875text-3xl
362.25text-4xl
483text-5xl
603.75text-6xl
724.5text-7xl
966text-8xl
1288text-9xl

About

Font Converter runs simple equations to calculate

px
,
em
and
rem
values.

px

when changed, adjusts the

rem
and
em
values by taking the
px
value and dividing by the
baseFontSize
.

rem = px / baseFontSize

rem/em

when changed, adjusts the

px
value by taking the
rem
/
em
value and multiplying by the
baseFontSize
.

px = rem * baseFontSize