Murelio

Loading the features you need.

CSS Unit Converter

Convert px and rem in either direction using a user-specified root font size.

How to use

  1. Choose direction, enter the value and root font size, then run.

Capabilities and scope

A dedicated runner selects px→rem or rem→px and lets the default 16px root size be changed.

How it works

px→rem computes value/base; rem→px computes value×base and trims unnecessary trailing zeros.

Example

With a 16px root, 24px is 1.5rem and 1.5rem is 24px.

Useful for

  • Convert CSS units using the actual html font size of a project

Before you use it

  • Other units such as vw, em, and pt are not handled, and only one root-size value is modeled at a time.

Frequently asked questions

Is 1rem always 16px?

No. 16px is only the default; enter the root size used by your project.

Related tools