Type tools

Relative unit converter

Turn pixel and percentage type values into font-relative units that scale with the text.

px Viewport px to px
px

Size at the largest viewport.

px

Size at the smallest viewport.

font-size clamp(...)

font-size uses clamp(min, preferred, max) with sizes in rem and the slope in vw, so it stays zoom-friendly. Line-height can be entered as a unitless ratio, px, or % — whichever you pick, it resolves to a rem length at each end, because unitless line-height can’t live inside clamp(). Both share the viewport range and root size set above.