px ↔ rem 変換機
開発者ツールルートフォントサイズベースの換算、一般的なスケール表付き
回答概要
px ↔ rem Converter: Root font-size based conversion with common scale table. rem = px ÷ root font-size (browser default 16px).
px
px
rem
24px = 1.5rem · 1.5rem = 24px
1 rem16 px
24 px1.5 rem
1.5 rem24 px
62.5% trick10px = 1rem
換算手順
- 1rem = px ÷ root font-size. 24px ÷ 16 = 1.5000 rem.
- 2px = rem × root font-size. 1.5rem × 16 = 24.00 px.
- 3html { font-size: 62.5% } でルートフォントサイズを10pxに設定すると、1.6rem=16pxになり暗算コストゼロになります(ただしユーザーのブラウザフォントサイズ設定を上書きするためトレードオフが必要)。
よく使うグラデーション(クリックで入力)
| px | rem | 用途 |
|---|---|---|
| 12px | 0.75rem | Caption text |
| 14px | 0.875rem | Small body |
| 16px | 1rem | Default body (browser base) |
| 18px | 1.125rem | Large body |
| 20px | 1.25rem | Small heading |
| 24px | 1.5rem | H3 heading |
| 32px | 2rem | H2 heading |
| 48px | 3rem | H1 display |
remはユーザーのブラウザフォントサイズ設定を尊重し(アクセシビリティに友好的)、pxは尊重しません。フォントサイズとレイアウトの間隔にremを使用し、ボーダー(1px細線)と影にpxを使用してください。emは親要素のフォントサイズを基準とします——ネストすると階層的に拡大/縮小するため慎重に使用してください。
このツールはお役に立ちましたか?
使い方
- Paste or type content: drop code/text into the px ↔ rem Converter or fill the parameters.
- Choose mode/options: switch format, rules or processing as needed.
- Live output: results appear instantly — nothing is submitted, data stays in your browser.
- One-click copy: copy the output straight into your development environment.
主なポイント
- px ↔ rem Converter is a free online developer tool — open and use, no sign-up.
- All calculations run locally in your browser; your data never leaves the device.
- Key capability: Root font-size based conversion with common scale table.
- Results come with formulas and reference tables so you can verify every number.
原理と計算式
px ↔ rem conversion
rem = px ÷ root font-size (browser default 16px)
em is relative to the parent (compounds); rem is always root-relative
vw = px ÷ viewport width × 100
Trick: set html font-size to 62.5% so 1rem = 10px
Example: 24px at 16px root = 1.5rem; 24px on a 1440px viewport ≈ 1.667vw.
よくある質問
How do I use the px ↔ rem Converter?
Open the page and fill in the input fields — results update automatically. Root font-size based conversion with common scale table.
Are the results accurate?
Yes. Standard formulas and conversion factors are used and verified.
Is it free? Do I need to sign up?
Completely free. No registration, login or download required.
Does it work on mobile?
Yes. The responsive design works on phones, tablets and desktops.
Is my data saved?
No. Everything runs locally in your browser.
関連ツール
関連ガイド
出典と更新情報
Based on RFC 4648, ECMA-262 and related specifications. Last updated: 2025-07
最終更新日:
このページの計算式と内容はYiJianSuanチームにより確認されています。学習参考用であり、実際の業務では公式の発表を優先してください。
内容はYiJianSuan編集チームにより維持管理され、定期的に確認されています。更新・審査プロセスはこちら編集ポリシー.
このページを引用: YiJianSuan. px ↔ rem 変換機[EB/OL]. https://www.yijiansuan.com/ja/c/dev/px-rem
本ツールが提供する結果は参考用であり、専門的な助言を構成するものではありません。公式の計算結果を優先してください。