PX to REM and EM Converter
Type a pixel, rem or em value and the other two update live from your root font size, 16px by default, plus a table from 8 to 96 px in pt too.
Reference table (base 16px)
| px | rem | pt (aprox.) |
|---|
REM vs EM vs PX
px: absolute size, does not scale with user preferences.
rem: relative to the root element (html). Scalable. Recommended for accessible typography.
em: relative to the parent element. Useful for padding and margin proportional to local text.
Convert px to rem and em
Relative units like rem and em make a layout more accessible and easier to scale, which is why they're the way of modern CSS. The catch is that most of us still reason in pixels. This converter closes that distance: type the value in px and get the equivalent in rem and em, or go the other way around.
Since the conversion depends on the base font size, usually 16px, we left that base configurable so the number lines up with what's in your project. There's also a reference table with the most common sizes, good for a quick lookup while you build the stylesheet.
The whole calculation happens in the browser. It serves web developers well when they want to move to relative units without redoing division in their head for every measurement.
Frequently asked questions
Why do rem and em always show the same number here?
Should I move the base from 16px to 10px, as people often suggest?
Is the pt column meant for print?
Related Tools
CSS Clamp Calculator
Generate CSS clamp() values for fluid typography and spacing. Enter minimum/maximum sizes and viewport widths to get a ready-to-paste clamp() function.
CSS Unit Converter
Convert between px, em, rem, %, pt, vh, vw for common design values — configurable 16 px base. Everything in your browser.
CSS Loader Generator
Create pure-CSS spinners and loaders in 8 styles (ring, dots, pulse, bars, etc.). Adjust color, size and speed. No libs, no GIFs. Everything in your browser.
Programming Case Converter (camelCase, snake_case)
Convert text between camelCase, PascalCase, snake_case, SCREAMING_SNAKE_CASE, kebab-case, dot.case, Title Case and more with one click. Perfect for renaming variables and API fields.
Typographic Scale
Generate a harmonic typographic scale based on a ratio (1.125, 1.25, 1.333, 1.5, 1.618). Output in rem, px and CSS clamp.
prefers-reduced-motion CSS
Builds the @media (prefers-reduced-motion: reduce) block that neutralises animations, transitions and smooth scrolling, page-wide or only inside .anima.