How to Use
Convert values:
- Single: Enter a px or rem value
- Base size: Set root font size (default: 16px)
- Batch: Enter multiple values separated by commas
Conversion Formula
rem = px / base_font_size. With the default 16px base: 24px = 24/16 = 1.5rem. Conversely: 2rem = 2 × 16 = 32px.
Best Practices
- Use rem for font sizes and spacing for accessibility
- Use px for borders, shadows, and fine details
- Set a base font size on html element (typically 62.5% = 10px for easy math)
- Use em for component-relative sizing
Step-by-Step Instructions
- 1Enter a pixel or rem value.
- 2Adjust the base font size if needed.
- 3View the converted result.
- 4Copy the CSS-ready output.
- 5Check the common sizes reference.