Binatomy
PX ↔ REM

PX to REM Converter

Converti pixel in rem/em e viceversa con base font size configurabile

PX → REM

REM → PX

Tabella di conversione (base 16px)

PXREMTailwind
4px0.25remp-1
8px0.5remp-2
12px0.75remp-3
14px0.875rem
16px1remp-4 / text-base
18px1.125rem
20px1.25rem
24px1.5remp-6
32px2remp-8
40px2.5rem
48px3rem
64px4rem
80px5rem
96px6rem
FAQ

Domande Frequenti

Tutto quello che devi sapere sulle unità CSS px, rem ed em

Qual è la differenza tra px, rem ed em?

px è un'unità assoluta che non scala. rem (root em) è relativo alla dimensione del font dell'elemento root (html), di default 16px. em è relativo al font size dell'elemento padre. rem è preferito per la scalabilità e l'accessibilità.

Perché usare rem invece di px?

rem migliora l'accessibilità permettendo agli utenti di scalare tutto il testo cambiando il font size del browser. Con Tailwind CSS, 1rem corrisponde normalmente a 4 unità (es: text-base = 1rem = 16px).

Come impostare il base font size?

In CSS puoi impostare il font base con html { font-size: 16px; } o html { font-size: 62.5%; } (quest'ultimo rende 1rem = 10px per calcoli più semplici). Molti design system usano 16px come base predefinita.

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.