🧮 Px to Rem Converter

Convert pixel values to rem against a chosen root font size, the usual way to keep responsive and accessible layouts.

📐 工作原理與說明
rem = px / root(root 為根元素 font-size,預設 16px)
rem 相對根元素字型大小:以根字號為基準換算,便於做響應式與可訪問性友好的佈局(使用者調整根字號時整體等比縮放),用於設計稿落地。

Formula & Standard References

Item Formula / Note Source / Standard
Conversion rem = px / root font size, 16 px by default CSS Values and Units Level 4
User zoom rem layouts scale when users enlarge the default font size WCAG 2.2 (1.4.4)
Root size changes changing the root size shifts every rem value at once CSS Values and Units Level 4
⚠️ 使用說明與注意事項

📏 常用尺寸速查表(root = 16px)

pxrem常見用途
80.5小間距 / 描邊
120.75輔助文字
140.875正文小字
161正文基準
201.25小標題
241.5標題 / 間距
322區塊標題
483大標題
644頁面主標題

若採用 62.5% 根字號方案(1rem=10px),上表 rem 值直接乘以 1.6 即可,例如 16px→1.6rem、24px→2.4rem。