Loona Automation logoLoona Developer Tools
Home › CSS Tools

PX to REM Converter

In short: convert px to rem against any base font size (16px by default) — with a ready table of the common values at your base.
🔒 Private by design: everything runs in your browser on this device. Your input is never uploaded to a server.

About

rem is relative to the ROOT font size (the element), which defaults to 16px in every major browser and is the unit accessibility guidance favours: users who raise their browser font size get proportionally larger rem-based layouts, while px ignores them. Converting px designs to rem is the standard first step of making a fixed design fluid — divide by the root size (usually 16) and keep four decimals at most; browsers do not need more.

Frequently Asked Questions

Why is the default base 16?

Every major browser ships with a 16px default root font size; designs and frameworks (Tailwind's spacing scale among them) assume it unless the user or the CSS changes it.

Should I use px or relative units?

Relative units (rem for layout, em for component internals) respect user font preferences — an accessibility requirement in most guidelines. px survives for hairline borders and fixed media.

Related Developer Tools

Embed this tool on your website — free

Add this tool to your own website or blog — it is completely free, needs no sign-up, and always shows the latest version. Copy the code below and paste it into your page where you want the tool to appear. Keeping the small “Powered by Loona Automation” credit line under the embed helps keep this tool free — but you are free to style or remove it; the tool works either way.