PX to REM Converter

Convert pixel values to rem for responsive, accessible CSS — one value or a whole block of CSS at once.

FreeNo sign-upRuns in your browserMobile-friendly

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

  1. Set the root font size (usually 16).
  2. Enter a pixel value, or paste CSS into the bulk box.
  3. 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.

Embed this tool on your website

Add the free PX to REM Converter to your blog or website. Paste the code into your page’s HTML; the tool runs in your visitors’ browsers and stays up to date automatically. Please keep the credit line below the tool.

Free to use on any website. The tool runs inside an iframe served from viptools.pk; nothing your visitors type is sent to your site or ours. Preview the embedded version.