splicedesign / culture / practice
← All tools

Handoff tool

Unit Converter

Type one value and get it in every unit a design system needs, including a complete table for pasting into a handoff doc or pull request.

Inputs

Converted

UnitValueNotes
Root used16px
Parent used16px

How to use it

  1. Enter the value you have and select the unit it is written in.
  2. Set the root size — usually 16px, unless your CSS changes it on html.
  3. For em, also set the parent font size, because em resolves against the closest parent that has a font size, not against the root.
  4. For %, set what the percentage is of — commonly a container width for layout values.

How it is calculated

Everything is converted through pixels first, then out again. The fixed relationship 1in = 96px = 72pt gives the point conversion.

to px:   px = value × unitScale
          rem → rootSize      em → parentSize
          pt  → rootSize/72 × 96      % → percentBase / 100

from px: rem = px / rootSize        em = px / parentSize
         pt  = px × 72 / 96          % = px / percentBase × 100

Because browsers apply the same maths, the result matches what the computed style will say — assuming your root and parent values are correct. When they are not, em-based spacing is the most common source of surprise.

rem and em are identical when root and parent sizes match. They diverge the moment a component sets its own font size, which is why em is better for component-internal spacing and rem better for global tokens.

Worked example

Convert 24px against a 16px root and a 20px parent:

rem = 24 / 16 = 1.5rem
em  = 24 / 20 = 1.2em
pt  = 24 × 72 / 96 = 18pt
%   = 24 / 600 × 100 = 4%

Set the parent field to 16px and the em column becomes 1.5 as well — that single field is the whole difference between the two units.

Where this works, and where it does not

Use it for handoff tables, converting a print spec into web units, and sanity-checking existing CSS. The maths is exact for the values you supply.

It does not know your actual cascade. Nested em values compound, ch and vw depend on the rendered font or viewport, and browser zoom changes nothing here because zoom scales the whole page. When accuracy matters, confirm in DevTools.