px 16 rem 1 em 1 pt 12 % 100 vw 1.25 vh 2.2222
About CSS Unit Converter — px to rem, em, pt, vw & vh
CSS length units fall into two camps: absolute units like `px` and `pt`, and relative units like `rem`, `em`, `%`, `vw`, and `vh` that resolve against some context — the root font size, the parent element, or the viewport. Translating a design value from one to another by hand means remembering that 1rem is the root font size (16px by default), that 1px is 0.75pt, and that 50vw is half the viewport width. This CSS unit converter does the arithmetic for you.
Enter a value and its unit, set the root font size, parent font size, and viewport dimensions that match your project, and every other unit updates live. It's perfect for turning a 24px design spec into rem, checking what a 5vw heading resolves to on a phone, or converting print-style pt values to pixels.
Everything runs entirely in your browser — no value you type is ever uploaded, and the converter works fully offline.
Features
- Convert between px, rem, em, pt, %, vw, and vh in one view
- Configurable root font size (px↔rem) and parent font size (em/%)
- Live viewport width and height for vw/vh conversions
- Pure, instant, and fully offline — your values never leave the device
How to use
- Type the value you want to convert into the input.
- Pick the source unit and set the root font size in the toolbar.
- Adjust parent font size and viewport dimensions if you use em, %, vw, or vh.
- Read the equivalent value in every unit and copy the one you need.
Frequently asked questions
How do I convert px to rem?
Divide the pixel value by the root font size. With the default root of 16px, 16px is 1rem, 24px is 1.5rem, and 32px is 2rem. Change the root font size in the toolbar if your project sets a different base.
What is the difference between rem and em?
rem is always relative to the document root font size, so it is predictable everywhere. em is relative to the font size of the current element (its parent for most properties), so it compounds when nested. This tool resolves em against the parent font size you set.
How are pt and px related?
CSS defines 1 inch as 96px and 72pt, so 1px equals 0.75pt and 1pt equals roughly 1.333px. A 16px value is 12pt. pt mostly shows up in print stylesheets.
How are vw and vh calculated?
1vw is 1% of the viewport width and 1vh is 1% of the viewport height. With a 1280px-wide viewport, 50vw is 640px. Set the viewport width and height fields to match the screen you are targeting.
Does this converter send my data anywhere?
No. All conversions are plain arithmetic performed locally in your browser. Nothing you enter is transmitted, and the tool works with the network unplugged.
Related tools
Everything runs locally in your browser — your input is never uploaded.