Skip to main content
TOP free online tools Your Workbench
English

CSS Unit Converter

Convert CSS units between px, rem, em, pt, mm, cm, and inches. Essential for responsive design.

Local browser processing — zero server uploads

How to Use

  1. Paste or type your pixel value into the CSS Unit Converter input area above.
  2. Configure any format or mode options to generate the all unit representations in real time.
  3. Review the generated output in the result panel above, or click Reset to start over.

What is CSS Unit Converter?

A CSS Unit Converter translates a CSS pixel (`px`) measurement simultaneously into `rem`, `em`, `pt`, `mm`, `cm`, and `in` values using standard 96 DPI web reference ratios. Frontend developers and UI designers use it to move fixed pixel spacing from design mockups into scalable responsive stylesheets.

How It Works

As you type a pixel number into the input field, React divides the numeric value by each unit’s fixed pixel factor (`px: 1`, `rem: 16`, `em: 16`, `pt: 1.333`, `mm: 3.779`, `cm: 37.795`, `in: 96`) in real time inside your browser and renders all seven conversions rounded to three decimal places.

Common Use Cases

  • Typography scale conversion — convert Figma pixel font sizes (e.g. `24px`, `18px`) directly into `rem` / `em` assuming a `16px` root
  • Print stylesheet sizing — translate screen `px` dimensions into `pt`, `mm`, `cm`, or `in` at 96 DPI for `@media print` CSS
  • Design token migration — rapidly inspect multiple responsive units from a single pixel entry without switching dropdowns
  • Border and spacing audits — check exact fractional `rem` equivalents for `4px`, `12px`, and `32px` spacing steps
Technical Details

Execution: live browser-local division against 96 DPI / 16px-root constants (`rem/em = 16`, `pt = 1.333`, `mm = 3.779`, `cm = 37.795`, `in = 96`). Outputs 3-decimal stat cards (`toFixed(3)`); relative `vw`/`vh` units omitted.

FAQ

What is the base font size?

We use 16px as the default root font size for rem/em calculations.