chiefletterAll tools

Coding / Chiefletter Workbench

CSS unit converter

Convert pixel values to rem and em using your chosen root size.

Convert a CSS length between pixels, rem, and em using an explicit base font size. The converter makes the arithmetic visible so you can check a design token or translate a pixel measurement without guessing. It does not inspect a stylesheet or compute the browser’s inherited font size.

Use it here

CSS unit converter

Runs in your browser. Your input is not sent to Chiefletter.

How to use this tool

  1. Enter the pixel value and the root font size in pixels.
  2. Enter the parent font size when you need an em conversion.
  3. Read and copy the px, rem, and em results, then verify the computed size in the actual layout.

Use cases

  • Convert a spacing value into a rem-based design token.
  • Check the font size produced by an em value in a nested component.
  • Document the relationship between a Figma measurement and a CSS declaration.

Notes and limits

A rem uses the root element font size. An em uses the computed font size of the relevant parent for many properties, and can compound through nesting. Browser zoom, user settings, inheritance, and the property itself affect the final rendered size.

Frequently asked questions

What default does rem use?

The tool starts with 16 pixels as the root size. Change it to match your project or the browser setting you are checking.

Why does em differ from rem?

Rem is based on the root font size. Em generally depends on the element’s parent context, so nested values can compound.

Does this show the exact rendered CSS size?

No. It calculates from the values you enter. Inspect computed styles in the browser to confirm a real page.