Free calculators, PDF, photo and audio tools.
Or pick a job
New tools, new guides and money tips by email. No spam, and you can leave any time.
Free. We never share your email.
Developer Tools
CSS Unit Converter
Convert px to rem, em, pt and percent with your own base font size.
The CSS Unit Converter turns any size between px, rem, em, pt, %, vw and vh, using a base font size and viewport size you can change. It shows a live preview of the size, and a table of common sizes, body text, headings, hero text, in px, rem and pt.
Pixels are fixed. A rem is relative to the root font size of the page, which is 16px in most browsers, so 24px is 1.5rem. An em is relative to the font size of the element itself, so its value depends on where it's used; the tool uses the same base size for both.
1vw is 1% of the browser window's width and 1vh is 1% of its height. They're handy for full-screen sections and fluid headings. Enter the screen size you're designing for, such as 390 × 844 for a phone or 1440 × 900 for a laptop, to see what a value works out to.
If a user increases the default font size in their browser, sizes set in rem grow with it, while sizes set in px stay fixed. Using rem for text and spacing makes a site more comfortable for people who need larger text.
14px with a 16px base is 0.875rem, or 10.5pt.
2.5rem with a 16px base is 40px, or 30pt.
16px by default, but it follows the root font size, so it changes if the page or the user sets a different size.
16px, since 1pt equals 4/3 of a pixel.
Use rem for consistent sizing across the page. Use em when you want something to scale with its own element's font size, like padding on a button.
Divide the pixel value by the root font size. At the default 16px base, 14px is 14 / 16 = 0.875rem. Select px, type 14 and the rem row shows the answer; change the base slider if your site uses a different root size.
1vw is 1% of the viewport width and 1vh is 1% of the viewport height. On a 1440px-wide screen, 1vw is 14.4px. Enter your own viewport width and height to see how a vw or vh size works out on that screen.
CSS defines 1 inch as 96 pixels and a point is 1/72 of an inch, so 1px equals 72 / 96 = 0.75pt. To go from pt to px, divide by 0.75: 18pt is 24px. Points are mostly used for print stylesheets.
Here % means a font size relative to the base size, so 150% at a 16px base is 24px. In real CSS, a percentage font size is relative to the parent element's font size, and a percentage width is relative to the parent's width, not the font.
The converter assumes the parent's font size equals the base. In real pages, em multiplies by the parent's font size, so nested elements compound: 1.2em inside 1.2em at a 16px base is about 23px, not 19.2px. Use rem to avoid this.
Setting html { font-size: 62.5% } makes the root size 10px in browsers with the default 16px setting, so 1.6rem equals 16px and maths is easier. Set the base slider to 10px to convert with this setup.
Phones report a CSS viewport width much smaller than their screen resolution, and many Android phones fall between about 360px and 412px wide. Enter the width you are designing for to check how vw values will look on phones.
The live preview is capped at 96px so it fits on the page, and the label says capped at 96px when your size is larger. The converted values themselves are not capped and are correct for any size.
Free calculators, PDF, photo and audio tools.
New tools, new guides and money tips by email. No spam, and you can leave any time.
Free. We never share your email.
Every tool on Quick Work Studio, free and in your browser. Prefer reading first? See the guides or full directory.
Convert px to rem, em, pt and percent with your own base font size.
Save favourites across visits.
Update the password for your account.
This permanently deletes your account, your saved favourites, your synced notes and tasks, and any feedback linked to it. It can't be undone. Every tool keeps working without an account.
Found a bug or want a new tool? Tell us. We read every message.
Prefer email? contact@quickworkstudio.com
Your feedback is on its way to us.
Open all 182 tools from your home screen, full screen, like an app.
Free, no app store, under 1 MB. Remove it any time like any other app.
It opens straight into this tool, full screen, like an app.
A few taps, under 30 seconds.
What kind of tool?
How often would you use it?
Sign in to keep your favourites, saved results and settings on all your devices.
New here? Create a free account
Forgot your password? Reset it by email
Your saved results (0)Every tool works without signing in. An account keeps your favourites, saved results, settings and Selnah chats on all your devices.
Open any saved answer again, or share it.
Takes 20 seconds. No card, no spam.
Already have one? Sign in
Enter the email you signed up with. We'll send you a link to set a new password.
Remembered it? Sign in
Choose a new password for your account. You'll be signed in, and signed out on your other devices.
Link not working? Get a new one
Your favouritesSee all
Recently used
Settings
Tools keep working without an account, and you can sign up again any time.
Appearance
Tools
Your data
Help & info
Legal
Quick Work Studio · version 2.99