Free Tool

PX to REM Converter

Convert pixel values to REM and back instantly. Set any base font size, view a full conversion table, and copy CSS custom properties or a plain-text table for your stylesheet.

PX ↔ REM Converter

Enter a value in either field — both update live based on the base font size.

px

Pixels (px)

px

REM

rem

Root font-size CSS

:root {
  font-size: 16px;
}

Common values at base 16px

pxrem
8px0.5rem
10px0.625rem
12px0.75rem
14px0.875rem
16px1rem
18px1.125rem
20px1.25rem
24px1.5rem
28px1.75rem
32px2rem
36px2.25rem
40px2.5rem
48px3rem
56px3.5rem
64px4rem
72px4.5rem
80px5rem
96px6rem

Your data stays in your browser — no data is sent to any server.

What is REM and why use it?

REM (root em) is a CSS unit relative to the font size of the root element (<html>). Because it scales with the user's browser font-size preference, REM is preferred over pixels for typography, spacing, and layout — it makes sites more accessible and easier to maintain. The default browser base is 16px, so 1rem = 16px unless overridden.

The 62.5% trick

Setting :root { font-size: 62.5%; } makes 1rem equal to 10px (62.5% of 16px), which simplifies mental math — 1.6rem = 16px, 2.4rem = 24px, and so on. This tool lets you enter any custom base to preview your layout's rem values at a glance.

Tips for best results

Work with a sample payload first, then paste production data. Keep privacy in mind: prefer local browser processing for secrets, tokens, and customer data. Bookmark this page for faster access next time.

How to use

  1. Set the base font size (default 16px, matching most browsers).
  2. Type a pixel value — the REM equivalent updates instantly.
  3. Or type a REM value — the pixel equivalent updates instantly.
  4. Scroll down to see the conversion table for common sizes.
  5. Copy the table as CSS custom properties or plain text for your project.
  6. Review the output and use Copy to paste into your editor, ticket, or chat.
  7. Need another utility? Scroll to Related Tools below for PX to REM Converter companions on skybin.io.
  8. For a deeper walkthrough, read the linked Skybin blog article at the bottom of this page.

Online tool vs terminal

Terminal / CLIThis tool
Install CLI tools or write a one-off scriptOpen the tool in your browser — no install
Look up flags in man pages or Stack OverflowPaste input or upload files where supported
Repeat for each file format or edge caseGet instant visual feedback and copy buttons

All conversion runs in your browser — nothing is sent to any server.

From the Skybin blog

Free developer tools from Skybin

Read the guide on Skybin

Frequently Asked Questions

What is the default browser font size?
Most browsers default to 16px for the root font size, meaning 1rem = 16px. Users can change this in their browser settings for accessibility, which is exactly why rem is preferred over fixed px values.
How do I convert px to rem mentally?
Divide the pixel value by the base font size. With the default 16px base: 24px ÷ 16 = 1.5rem. If you use the 62.5% trick (base = 10px): 24px ÷ 10 = 2.4rem.
Should I use rem or em?
REM is relative to the root element and is consistent throughout your document. EM is relative to the nearest parent element, which can compound unexpectedly. REM is generally preferred for font sizes and spacing; EM can be useful for component-scoped sizing.
Does this tool handle non-integer values?
Yes. You can enter decimals like 14.5px or 0.875rem and the converter will handle them accurately.
Is this tool free to use?
Yes. All Skybin developer tools are free with no account, API key, or usage limits.
Does my data get sent to a server?
No. Processing runs in your browser whenever possible. Sensitive input never leaves your device unless a tool explicitly fetches a URL you provide (e.g. OG Validator).
Can I use this on mobile?
Yes. The tools work in modern mobile browsers, though a desktop screen is easier for large JSON or PDF workflows.
How is this different from desktop apps?
There is nothing to install or update. Open a bookmarked URL and start working — ideal for quick tasks during development or support calls.
Are there keyboard shortcuts?
Most tools support standard paste (Ctrl+V / Cmd+V) and select-all in text areas. Copy buttons provide one-click output.
Does Skybin store my history?
No. We do not log tool inputs or outputs. Refreshing the page clears in-memory state unless the tool encodes state in the URL.