Command Palette

Search for a command to run...

CS

CSS Unit Converter

Convert between CSS units - px, rem, em, pt and % - with a configurable root font size, instant all-units output, and a px-to-rem reference table for responsive typography.

Convert from:
Converted values
px
16px
rem
1rem
em
1em
pt
12pt
%
100%
px → rem reference (base 16px)
pxremempt%
10.06250.06250.756.25
20.1250.1251.512.5
40.250.25325
80.50.5650
100.6250.6257.562.5
120.750.75975
140.8750.87510.587.5
161112100
181.1251.12513.5112.5
201.251.2515125
241.51.518150
281.751.7521175
322224200
362.252.2527225
402.52.530250
483336300
563.53.542350
644448400
Category:css
Mode:Offline
Version:1.0.0
Access:Free

What is a CSS Unit Converter?

CSS Unit Converter interface on Toolz.dev - Convert between CSS units - px, rem, em, pt and % - with a configurable root font size, instant all-units output, and a px-to-rem reference table for responsive typography.

A CSS Unit Converter translates a length between the units CSS uses for sizing type and layout: px, rem, em, pt, and %. It exists because modern responsive design leans on relative units - rem and em scale with the user’s font-size settings and zoom - while design mockups and older stylesheets are usually expressed in fixed pixels. This tool takes a value like 24px and shows it as 1.5rem, 1.5em, 18pt, and 150% at once, and works in every direction from a single field.

The conversions all hinge on one number: the root (base) font size, which defaults to 16px because that is the browser default for the html element. One rem always equals that base font size, so at 16px the value 16px is 1rem, 24px is 1.5rem, and 8px is 0.5rem. Points are tied to the CSS reference pixel - 1 inch is 96px and 72pt - so 1pt equals 96/72, about 1.333px. Percent is treated as a share of the base font size, so 100% equals the base and 50% equals half of it.

Everything runs in your browser as you type, so there is no upload and no waiting on a server. Change the base font size to model a component that sets its own font-size, read the results in every unit, and copy the one you need. The built-in px-to-rem table gives you a ready reference for the sizes that come up most in a type scale.

How to use the CSS Unit Converter?

1

Enter a value and pick its unit

Type the number you want to convert and choose the unit it is currently in - px, rem, em, pt, or %. You can also paste a value with its unit, like 24px, and the tool will read the unit for you.

2

Set the base font size

Adjust the root font size if your project uses something other than the 16px browser default. This controls how rem, em, and % relate to pixels.

3

Read every unit at once

The converter shows the equivalent value in all supported units instantly, each with its unit suffix so you can drop it straight into CSS.

4

Copy or use the reference table

Copy any result with one click, or scan the px-to-rem reference table for the common sizes in a typographic scale.

Key Features

Every unit at once

Enter one value and instantly see px, rem, em, pt, and % side by side, each formatted with its unit so you can paste it directly into a stylesheet.

Configurable base font size

The root font size is adjustable, so rem, em, and % conversions match your project - whether you use the 16px default, a 10px "62.5%" trick, or a component-level font-size.

Two-way, any direction

There is no fixed "from" and "to". Convert px to rem, rem to px, px to em, or pt to px - any unit to any unit - from a single input.

Px-to-rem reference table

A built-in table lists the rem, em, pt, and % equivalents for the pixel sizes that appear most in type scales, so you can eyeball a whole scale at your chosen base.

Frequently Asked Questions

Divide the pixel value by the root font size. At the browser default of 16px, rem = px ÷ 16, so 16px is 1rem, 24px is 1.5rem, and 8px is 0.5rem. Enter the pixel value in the converter and the rem equivalent appears instantly at whatever base font size you set.

Comments

0 comments

0/2000 characters

No comments yet. Be the first to share your thoughts!

px to rem converterrem to px converterpx to em convertercss unit converterpx to pt converterrem calculatorem to pxcss font size converterpixel to remresponsive font size converter