🧮 Rem to Px Converter

Convert rem values from a spec or design file back to pixels using the current root font size for fixed-size contexts.

📐 工作原理與說明
px = rem × 根字號 root(rem 值乘以當前根元素 font-size)。校驗:rem 與 root 均須填寫且為有限數值,root 必須大於 0;預設、0、負值或非數字都停止計算並清空舊結果,不回落 16px。判據:結果保留兩位小數,同步顯示「1rem = root px」基準說明,root 改變時換算同比例縮放。
把以 rem 為單位的標註或設計稿按當前根字號反算為畫素,用於需要固定尺寸的場景或與設計師核對標註。

Formula & Standard References

Item Formula / Note Source / Standard
Reverse conversion px = rem x root font size, 16 px by default CSS Values and Units Level 4
Query units em and rem in media queries resolve against the initial size CSS Media Queries Level 4
Rounding error keep two decimals to avoid accumulated rounding drift CSS Values and Units Level 4
⚠️ 使用說明與注意事項

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

rempx常見用途
0.58小間距 / 描邊
0.7512輔助文字
0.87514正文小字
116正文基準
1.2520小標題
1.524標題 / 間距
232區塊標題
348大標題
464頁面主標題

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