What does this page convert?
Five groups in one tool: rem/px/em, absolute lengths, percent and viewport, ch/ex/lh, and dpi/dppx/dpcm. Pick a tab. The fields in the other tabs stay as you left them.
Convert CSS lengths in the browser. Pick a group, edit any field, and the others follow. Nothing you type is uploaded.
rem = px / rootpx = rem × rootem = px / parentpx = em × parent1in = 96px1in = 2.54cm = 25.4mm1pt = 1/72in = 1.3333px1pc = 12pt = 16px% = px / parent × 100vw = px / viewport width × 100vh = px / viewport height × 100ch = px / width of “0”ex = px / x-heightlh = px / line-height1dppx = 96dpidpcm = dpi / 2.54dpi = dpcm × 2.54Five groups in one tool: rem/px/em, absolute lengths, percent and viewport, ch/ex/lh, and dpi/dppx/dpcm. Pick a tab. The fields in the other tabs stay as you left them.
No. The conversion runs in the browser. There is no account and no saved history.
Each tab is one unit group. Switching tabs does not clear the other groups.
On px to rem, rem to px, em to px, and px to em. Those pages use the same root and parent fields as the Rem/Px/Em tab.
No. The fields are a calculator. Nothing on this page edits a stylesheet.
CSS treats 1in as 96px, and 1cm as 96 divided by 2.54. 1pt is 1/72 of that inch, so 12pt is 16px. 1pc is 12pt, so 6pc is 1in. These are reference pixels. A ruler held against a monitor often will not match.
vw is a percentage of the viewport width you type. vh uses the height. 10vw on a 1000px-wide viewport is 100px. vmin uses the shorter side and vmax the longer one. Percent uses the parent size, not the viewport and not the font size.
ch is the width of the 0 glyph. ex is the x-height. lh is the element’s used line-height. This page cannot see your font, so the defaults are labeled guesses: 8px for ch, 8px for ex, and 24px for lh, which is 1.5 times a 16px font. Replace them with measurements from the font you ship.
In CSS, 1dppx equals 96dpi. dpcm is dpi divided by 2.54, so 96dpi is about 37.7953dpcm. A device pixel ratio of 2 is 2dppx, which is 192dpi.