px ↔ rem ↔ em ↔ vw converter
Turn any CSS measurement into the other units instantly. Adjust the base size and viewport for exact equivalents, and click a result to copy it.
Processed 100% in your browser
How can I verify this?
Your files are never uploaded: they are processed on your device. Check it yourself: load the page, turn off your WiFi and the tool keeps working. Or open your browser’s developer tools (F12), go to the Network tab, and see that no file leaves your device.
Equivalents
px → rem table
Ctrl + Enter runCtrl + C copy result
How to use
- 1Type the value and choose its unit.
- 2Adjust the base font size (16 px by default) and the viewport size.
- 3Click an equivalent to copy it.
- 4Use the px to rem table for common sizes.
Use cases
- Convert a pixel-based design to rem for accessible CSS.
- Work out viewport-relative widths with vw and vh.
- Turn points from a print design into pixels.
- Use a 10 px base to simplify calculations.
Frequently asked questions
How many px is 1 rem?
16 px by default, the font size browsers apply. It changes if the user or the CSS alters the root font size.
What is the difference between rem and em?
rem depends on the root element’s font size; em on the element’s own or its parent’s. Here both use the base size you set.
Why use rem instead of px?
It respects the user’s text size setting, which improves accessibility.
How are vw and vh calculated?
1vw is 1% of the viewport width and 1vh is 1% of its height, so you enter them in pixels.