px → rem Converter
CSSConvert px to rem, em, pt, vw and more with configurable base font size
Enter a px value straight from a design mockup and get the matching rem, em, and pt values, computed against a configurable base font size since rem is always relative to the root element's size (16px by default in browsers, but plenty of sites override it), and this tool lets you match whatever your actual project uses. It also distinguishes rem from em clearly: em is relative to the parent element and can compound across nested elements, which makes it less predictable for consistent spacing than rem's always-relative-to-root behavior. A vw conversion is included too for fluid, viewport-relative layouts, though raw vw scales linearly with no minimum or maximum, which can make text unreadably small or huge at the extremes, so most real-world usage wraps it in `clamp()` rather than using it bare. All conversion is simple math done locally.
How to use px → rem Converter
- 1.Enter a px value from a design mockup to instantly get the matching rem, em, and pt values based on your project's base font size.
- 2.Change the base font size (default 16px) to match a project that uses a non-standard root size, then re-check your conversions.
- 3.Convert a px value to vw when building a fluid, viewport-relative layout and you need a rough starting ratio.
Frequently asked questions
Use via API, SDK, or MCP
cURL# Free: 1,000 req/day · Pro: 10,000 req/day
curl -X POST https://api.utilix.tech/v1/tools/px-rem \
-H "Authorization: Bearer utx_live_..." \
-H "Content-Type: application/json" \
-d '{"input":16,"mode":"px-to-rem","base":16}'Get an API key from your dashboard · Full API docs →