What is this tool?
The PX to REM Converter is a utility for web developers and designers to quickly translate absolute pixel dimensions (PX) to relative, accessible layout units (REM). By converting absolute screen values to relative layout values, you can build responsive, accessible, and user-configurable interfaces.
How to use it
1. Set your base document font-size in the "Base Font Size" box (usually 16px by default).
2. Type in the "Pixels (PX)" input to see the REM value update instantly.
3. Alternatively, enter a REM value to calculate the corresponding pixels.
4. Copy the auto-generated CSS code snippet for direct paste into your stylesheet.
Pro tips
- Tailwind CSS and many modern design systems use a base of 16px (1rem) for their spacing scale (e.g., p-4 is 1rem/16px).
- Keep the base size customizable to match different frameworks or custom themes that reset the html font-size to 62.5% (10px) to make math easier.