Tools
Dev & Design
px β rem Converter
Convert CSS units instantly β single values, bulk paste, Tailwind scale & breakpoint reference.
Basepx
Property
Quick convert
px
=1
remBulk convert
Test data
Breakpoints
| Name | px | rem | |
|---|---|---|---|
| sm | 640 | 40 | |
| md | 768 | 48 | |
| lg | 1024 | 64 | |
| xl | 1280 | 80 | |
| 2xl | 1536 | 96 |
Tailwind scale
Click any row to copy CSS snippet
How it works
rem (root em) is relative to the document's root font size, usually set on <html>. The default browser font size is 16px, making 1rem = 16px. Changing the base updates every calculation instantly.
- βTypography scale β Convert your designer's px specs to scalable rem values
- βResponsive spacing β rem-based gaps/padding scale with user font preferences
- βAccessibility compliance β rem respects browser zoom; px does not
- βTailwind custom config β Find the exact scale value for a custom px size
- βDesign token migration β Bulk-convert a design system from px to rem
- βMedia queries β Convert px breakpoints to rem for font-size-aware queries
- βLegacy code refactor β Paste a CSS block's px values, get them all as rem
How it worksβΎ
rem (root em) is relative to the document's root font size, usually set on <html>. The default browser font size is 16px, making 1rem = 16px. Changing the base updates every calculation instantly.
- βTypography scale β Convert your designer's px specs to scalable rem values
- βResponsive spacing β rem-based gaps/padding scale with user font preferences
- βAccessibility compliance β rem respects browser zoom; px does not
- βTailwind custom config β Find the exact scale value for a custom px size
- βDesign token migration β Bulk-convert a design system from px to rem
- βMedia queries β Convert px breakpoints to rem for font-size-aware queries
- βLegacy code refactor β Paste a CSS block's px values, get them all as rem