🧰Locly

Convert px, rem & em

Convert between px, rem, and em with a custom root font size

About This Tool

CSS Unit Converter converts between px, rem, and em using your root font size (default 16). Change one field and the others update. Calculations are processed locally in your browser.

How to Use

  1. Set the root font size if needed
  2. Edit px, rem, or em
  3. Read the synced values
  4. Clear to reset defaults

Common Use Cases

  • Match design tokens to rem
  • Translate Figma px to CSS rem
  • Check em relative sizes
  • Teach CSS unit basics
  • Quick stylesheet tweaks

FAQ

Q1: What is the root font size?

It is the base px value used for rem (usually 16). Change it to match your html font-size.

Q2: How do em and rem differ?

rem is relative to the root; em is relative to the parent. This tool treats both against the same root size for a simple MVP conversion.

Q3: Is anything uploaded?

No. Conversion is processed locally in your browser.

Q4: Can values be zero?

Yes for px/rem/em. Root size must be greater than zero.

Related Tools