CSS Unit Converter (px ↔ rem)
Convert px, rem, em, %, and pt back and forth all at once, based on the root font size.
도구를 불러오는 중…
🔒 Everything runs 100% in your browser. Your files and input are never uploaded to any server.
This is a CSS unit converter that translates px, rem, em, %, and pt values between each other. Enter just one value and the results in the remaining units are calculated instantly, based on the root font size.
How to use
- Enter the value you want to convert and choose its unit.
- Enter the base (root) font size in px (the browser default is 16px).
- Once the px, rem, em, %, and pt results are calculated automatically, copy the unit you need and use it.
FAQ
- What's the difference between rem and em?
- rem is always calculated relative to the font size of the root (html) element, while em is relative to the parent element's font size. This tool assumes the base font size you enter is the parent when calculating both units.
- How is pt converted?
- Following web standards, 96px = 72pt — that is, 1px = 0.75pt. It's the print pt concept converted to a screen (96dpi) basis.
- Could the results differ from the actual screen?
- em and % actually vary with each element's parent font size, so the results here are reference values that assume the base you specified as the parent. When applying them for real, check the inheritance of the target element.
