PX to REM Converter
Convert pixel values to rem for responsive, accessible CSS — one value or a whole block of CSS at once.
Loading tool…
Need help with this tool or found a problem? WhatsApp support Email
What does the PX to REM Converter do?
rem units are relative to the root (html) font size, which is 16px by default in browsers. Using rem for font sizes and spacing means your layout scales when users increase their browser’s default text size — an important accessibility benefit.
Paste CSS like padding: 12px 24px; into the bulk box and every px value is converted (0.75rem 1.5rem) while the rest of your CSS stays unchanged.
How to use the PX to REM Converter
- Set the root font size (usually 16).
- Enter a pixel value, or paste CSS into the bulk box.
- Copy the rem result.
Examples
Font size
24px ÷ 16 = 1.5rem.
Bulk
margin: 8px 32px; → margin: 0.5rem 2rem;.
Common use cases
- Writing responsive, accessible CSS
- Converting designs from Figma (px) to code
- Refactoring legacy stylesheets
Features and benefits
- Private by design — your data is processed on your device and never uploaded.
- Free with no account, no watermark and no usage limits.
- Works on phones, tablets and desktops in any modern browser.
Limitations to know
- If your site sets html { font-size: 62.5% }, use a root size of 10.
Frequently asked questions
How do I convert px to rem?
Divide pixels by the root font size: 24 ÷ 16 = 1.5rem.
rem or em?
rem is relative to the root and predictable; em is relative to the parent element.
Should borders use rem?
Thin borders are often left in px.
Related tools
All converter toolsREM to PX Converter
Convert rem values back to pixels.
CSS Minifier
Minify CSS to reduce stylesheet size.
Developer ToolsCSS Formatter
Beautify minified CSS into readable rules.
Developer ToolsLength Converter
Convert metres, feet, inches, kilometres, miles and more.
Volume Converter
Convert litres, millilitres, gallons, cups and cubic units.
Data Storage Converter
Convert bits, bytes, KB, MB, GB, TB in decimal or binary units.