Turn rem or em values back into pixels for any root font size
Runs in your browser. Nothing you type is sent anywhere. Checked against sources on 22 Oct 2026.A design file says 24px and the code says 1.5rem; which is right? Type a rem or em value and get the pixels for your root font size, 16px by default or 10px for sites that set html to 62.5%. The table lists the common sizes both ways, and a value typed with px converts the other way, so one box answers both questions.
Paste or type your input.
Choose the options you need.
Press Ctrl+Enter, then copy or download.
Sizes in rem follow the reader's own font-size setting, so text and spacing grow together for anyone who has set a larger default. Designs are still handed over in pixels, and this converter does the arithmetic both ways.
One value. Type 24px and read 1.5rem; type 1.5rem and read 24px. A bare number counts as px. Change the root font size if your site sets one: many sites set html to 62.5%, which makes 1rem equal 10px. The table lists the common sizes for the root size you choose, in rem or in em.
em works the same way as rem but relative to the parent element's font size, so set the size to the parent's when you pick em. Values are rounded to the decimals you choose, four by default, and 0px becomes 0. Nothing you paste leaves your browser. Related tools: CSS Clamp Generator, CSS Formatter, Box Shadow Generator.
The rest of the article, and all 6 questions about PX to REM Converter, are on the PX to REM Converter page.
Divide the pixel value by the root font size. Browsers default to 16px, so 24px is 1.5rem, 14px is 0.875rem and 32px is 2rem. Type the value above, or paste a whole stylesheet to convert every px in it at once with the same root size.
One rem equals the font size of the html element. When the page does not set one, that is the browser default of 16px, unless the reader has changed it in their settings. A site that sets html to 62.5% makes 1rem equal 10px for readers with the default.
A rem is relative to the root html font size, so it means the same everywhere on the page. An em is relative to the font size of the element itself, or its parent for the font-size property, so nested ems multiply. Use rem for predictable spacing.
In a media query, rem and em always refer to the browser's initial font size, usually 16px, not to the size your page sets on html. So 768px becomes 48em even on a 62.5% site. Em breakpoints follow the reader's zoom and default size, which px breakpoints do not.
Rates and rules change; check the source before you rely on a figure.
Still stuck? Ask about PX to REM Converter and anybody who knows can answer. No account needed.
On the related tools: TSV to JSON – Convert tab-separated values, such as a paste from Excel, into JSON · Query String Parser – Split a URL query string into a table of decoded parameters.