Convert between px and rem using your root font size (default 16px).
px ↔ rem Converter
100% FreeConvert CSS pixels to rem (and back) with a custom root font size.
Converted
16px = 1rem (root 16px)
Embed This Tool
Easy to EmbedAdd px ↔ rem Converter to your website or blog in seconds.
- Responsive design
- Lightweight & fast
- No backend required
- Always up-to-date
<iframe
src="https://tools.town/embed/px-rem-converter/"
width="100%"
height="600"
style="border:none; border-radius:12px;"
loading="lazy"
title="px ↔ rem Converter">
</iframe> Advertisement
How to Use
- 1 Choose px → rem or rem → px
- 2 Enter the value
- 3 Set root font size (default 16)
- 4 Copy the converted unit into CSS
Features
- Both directions
- Custom root px
- 4-decimal rem precision
- Live conversion
- Client-side
Why it Matters
Design handoffs still quote px while codebases prefer rem. A one-field converter removes the mental divide-by-16 loop.
Frequently Asked Questions
Why root 16?
em units?
Subpixels?
Want to understand the math?
Related Tools You Might Like
Aspect Ratio Calculator
Find the aspect ratio of any size and resize images while keeping the same proportions.
Type Scale Generator
Generate a modular CSS typography scale — choose a ratio, base size, and unit to get CSS custom properties and a Tailwind fontSize config.
Unit Converter
Convert between length, weight, volume, area, and speed units — metric and imperial — instantly.
Border Radius Generator
Visually craft CSS border-radius with per-corner sliders, live preview, unit toggle (px/em/rem/%), and shorthand collapsing.
Box Shadow Generator
Visually craft CSS box-shadow — offset, blur, spread, color, opacity, inset toggle, plus Material-style elevation presets.