PX to REM Converter
PX → REM
REM → PX
Conversion table (base 16px)
| PX | REM | Tailwind |
|---|---|---|
| 4px | 0.25rem | p-1 |
| 8px | 0.5rem | p-2 |
| 12px | 0.75rem | p-3 |
| 14px | 0.875rem | |
| 16px | 1rem | p-4 / text-base |
| 18px | 1.125rem | |
| 20px | 1.25rem | |
| 24px | 1.5rem | p-6 |
| 32px | 2rem | p-8 |
| 40px | 2.5rem | |
| 48px | 3rem | |
| 64px | 4rem | |
| 80px | 5rem | |
| 96px | 6rem |
FAQ
Everything you need to know about CSS units px, rem and em
What is the difference between px, rem and em?
px is an absolute unit that does not scale. rem (root em) is relative to the font size of the root element (html), default 16px. em is relative to the parent element's font size. rem is preferred for scalability and accessibility.
Why use rem instead of px?
rem improves accessibility by allowing users to scale all text by changing the browser font size. With Tailwind CSS, 1rem normally corresponds to 4 units (e.g. text-base = 1rem = 16px).
How to set the base font size?
In CSS you can set the base font with html { font-size: 16px; } or html { font-size: 62.5%; } (the latter makes 1rem = 10px for simpler calculations). Many design systems use 16px as the default base.
Does my data stay private?
Yes, and not because we promise it: this tool runs entirely inside your browser. What you type or upload never leaves your device, so it never reaches a server of ours and there is nothing we could keep, read or lose. You can check it yourself: open the page, disconnect from the internet, and the tool keeps working.
Do you store what I enter?
No. There is no database behind this tool: we do not store your files, your text or your results. When you close the tab nothing is left — not here with us, because it never arrived, and not anywhere else.
Do you profile me? Are you GDPR compliant?
We do not profile you: there is no account to create, we never ask for your email to use a tool, and we keep no profile of what you do. We are an Italian company and we work under the GDPR and the other European rules, with the privacy notice and the consent request in plain sight. One thing we say in full rather than hiding it behind a slogan: the ads on the page are Google's, and Google may use cookies to personalise them. You decide from the consent banner: if you say no the ads stay, but they are not personalised, and the tool works exactly the same.
If it is free, how do you make money?
From the ads on the page, and that is all. We do not sell your data, there is no hidden paid plan, there is no limit that eventually asks for your card, and you do not have to sign up. The ads pay for the servers and for the time we spend writing the tools: that is how we can keep them open to everyone.