Loading devShakib…
Convert pixels to rem/em at a base font size and back. Free, runs entirely in your browser — no signup, and nothing you paste in is uploaded.
A rem is always relative to the root element's font size, where an em is relative to the *parent's* — which is the entire difference and the reason em compounds. Nest three elements sized in em and their font sizes multiply, producing text that shrinks the deeper it sits for no reason anyone intended.
The default root size is 16px in every major browser, so the conversion is usually a division by sixteen. Resist the temptation to set the root to 10px to make the arithmetic easier: it looks tidy and it overrides the size a reader deliberately chose in their browser settings.