CSS Unit Converter
Convert px, rem, em, and vw using a font size and container size you set.
Sizes the units depend on
Used by rem. Browsers start at 16.
Used by em and %. Leave empty to use the root size.
In every unit
Type a size and see it in every unit.
How to use it
- Type the value and choose its unit.
- Change the font sizes or viewport if needed.
- Press the card you need to copy it.
Examples
- Pixels to rem24px with a 16px root 1.5rem
- rem to pixels1rem with a 16px root 16px
- Pixels to vw32px at 1000px wide 3.2vw
Tool details and privacy
Type a size and its unit to see it in every unit on cards; press any card to copy the value with its unit, such as 1.5rem.
Designs are often handed over in pixels, while styles are written in rem or em so they follow the reader's font size.
Options
- rem uses the root font size; em and % use the parent font size (the root size when left empty).
- vw and vh use the viewport width and height you type.
- pt is a print unit: 96px = 72pt.
Limits
- Values are rounded to four decimal places.
- Arabic digits and a decimal comma are accepted.
Privacy
What you type stays in your browser. Nothing is uploaded or saved on the server.
Questions
What is the default root font size?
16px in most browsers.
What is the difference between rem and em?
rem always follows the root font; em follows the parent element's font.
Can I type 1,5?
Yes.
Is anything uploaded?
No.