Line Height Calculator
Turn a font size and a line-height ratio into pixels and rem, or find the unitless ratio for a target line height.
Design & Accessibility
Convert pixels to rem and rem to pixels for CSS, from any root font size, with points and percent alongside.
Pixels in rem
1.5
1rem equals the root (html) font size; em is relative to the parent element, so it only matches rem when the parent uses the root size. CSS defines 1pt as 1/72 inch and 1px as 1/96 inch, so 1px = 0.75pt.
Your files and text are processed on your own device, inside this page. Nothing is uploaded to Dubinity or stored, and closing the tab discards it. How privacy works
Enter a pixel size and your root font size (16px in every major browser unless the site or the visitor changes it) to get the rem value, and the reverse for a rem value. Points and percentages are shown too.
Using rem for font sizes lets text scale when a visitor raises their browser's default font size, which fixed pixel sizes do not.
Was this tool helpful?
Turn a font size and a line-height ratio into pixels and rem, or find the unitless ratio for a target line height.
Build a modular type scale from a base size and ratio, preview every step and export CSS, design tokens or Tailwind config.
Generate a spacing scale on a 4px or 8px grid, linear or geometric, with names and exports for CSS, tokens and Tailwind.
Build a small design-token set - colours, type scale, spacing, radii and shadows - and export CSS variables, DTCG JSON or Tailwind.
Convert a colour between HEX, RGB, HSL, HSV, HWB, CMYK and OKLCH, with contrast against black and white.
Generate placeholder paragraphs, sentences or words, in classic Latin or in Arabic filler text.