CSS Unit Converter

Convert responsive CSS units with live updates.

Convert between px, rem, em, pt, vh, vw, and %. Click any result to copy it.

Conversion settings

px
px
px
px

Common conversions (base: 16px)

pxremptNotes
10px0.625rem7.5ptsmall labels
12px0.75rem9ptsmall text
14px0.875rem10.5ptbody small
16px1rem12ptdefault body
18px1.125rem13.5ptlarge body
20px1.25rem15pth5
24px1.5rem18pth4
32px2rem24pth3
48px3rem36pth2
64px4rem48pth1

CSS Units: Key Concepts

rem (root em)
Relative to the root element (html) font size. 1rem = 16px by default. Unlike em, rem is not affected by nesting — it always references the root. Preferred for scalable layouts.
em
Relative to the current element's font size (or inherited). In nested elements, em compounds: a child of font-size: 1.5em inside a parent of 1.5em results in 2.25× the root size. Useful for component-scoped scaling.
vw / vh
Viewport width and height units. 1vw = 1% of the viewport width; 1vh = 1% of the viewport height. Dynamic on resize. On mobile, 100vh includes the browser chrome; use dvh (dynamic viewport height) to exclude it.
pt (points)
A physical print unit: 1pt = 1/72 inch. At 96dpi screen resolution, 1pt ≈ 1.333px. Used in print stylesheets and design tools (Figma, Illustrator). Avoid pt for screen CSS — use px, rem, or em instead.

Frequently Asked Questions

When should I use rem instead of px in CSS?

Use rem for font sizes, spacing, and anything that should scale when a user changes their browser's default font size. Browsers default to 16px, so 1rem = 16px — but users on accessibility settings may raise this to 20px, and rem values will scale proportionally. Use px only for things that should stay fixed regardless of user settings, like border widths or icon sizes.

What base font size does rem use by default?

The browser default is 16px, so 1rem = 16px. You can override this with html { font-size: 62.5%; } to make 1rem = 10px, which simplifies mental math (1.4rem = 14px). However, this overrides the user's browser font preference, which hurts accessibility. A better approach is to leave the root font size as the browser default and use rem values as they are.

Why does em compound in nested elements?

em is relative to the element's own font size. If a parent has font-size: 1.5em and a child also has font-size: 1.5em, the child ends up at 1.5 × 1.5 = 2.25em relative to the root — not 1.5em. This compounding behavior makes em tricky in deeply nested components. Use rem when you want consistent sizing that ignores nesting depth.

What is the difference between vw/vh and dvw/dvh?

vw and vh are relative to the initial viewport size — on mobile, this includes the browser's address bar and bottom navigation. When those UI elements hide during scroll, elements sized with vh can overflow. dvw (dynamic viewport width) and dvh (dynamic viewport height) update in real time to always equal the currently visible area. Use dvh for full-screen layouts on mobile to avoid scroll issues.

Should I ever use pt (points) in web CSS?

Generally no. pt is a print unit (1pt = 1/72 inch) and it is only meaningful in print stylesheets (@media print). On screen, pt values are converted based on a fixed 96dpi assumption — 1pt ≈ 1.33px. Design tools like Figma and Illustrator use pt, so this converter helps you translate those values to rem or px for your CSS.

By Muhammad Abdullah Rauf · Founder, EverydayTools.proUpdated 2026

What is CSS Unit Converter?

Convert responsive CSS units with live updates. Use it in your browser without uploading files for typical workflows.

Free CSS unit converter — convert px, rem, em, vw, and vh with a custom root font size. See all CSS unit equivalents at once for responsive design. No signup required. Runs locally in your browser when supported—no upload required for normal use. Designed for quick everyday tasks with clear, copy-friendly output.

Free CSS unit converter — convert px, rem, em, vw, and vh with a custom root font size. See all CSS unit equivalents at once for responsive design. No signup required.

Quick answers

Concise answers for common searches — definitions, steps, and comparisons.

What does CSS Unit Converter do?

Convert responsive CSS units with live updates.

Is CSS Unit Converter private?

CSS Unit Converter (/css-unit-converter) runs in your browser when supported—inputs are not uploaded to EverydayTools servers.

How to use CSS Unit Converter

  1. Open the tool

    Load CSS Unit Converter on EverydayTools—no account required.

  2. Enter your input

    Type, paste, or upload depending on what the tool accepts.

  3. Review results

    Results update in your browser for typical use cases.

  4. Copy or export

    Copy the output or use download/export when available.

Who uses CSS Unit Converter?

Common real-world scenarios where this tool saves time.

Everyday use

Convert responsive CSS units with live updates.

Privacy-first workflows

Use when you want results without uploading files—local browser processing when the tool supports it.

Mobile and desktop

Open CSS Unit Converter in any modern browser for quick checks with copy-friendly output.

Reference tables

CSS Unit Converter at a glance

How this EverydayTools page compares for typical use.

AspectEverydayToolsTypical alternative
CostFreePaid apps or trials
PrivacyBrowser-local when supportedOften requires cloud upload
SignupNot requiredOften required

Advertisement

Frequently Asked Questions

When should I use rem instead of px?

Use rem for type and spacing that should respect user font settings; use px for fixed borders and icons.

What base font size does rem use?

Browsers default to 16px for 1rem unless you change the root font-size (consider accessibility).

How do I use CSS Unit Converter?

Convert responsive CSS units with live updates.

What does CSS Unit Converter do?

Convert responsive CSS units with live updates.

Is CSS Unit Converter private on EverydayTools?

CSS Unit Converter (/css-unit-converter) runs in your browser when supported—inputs are not uploaded to EverydayTools servers.

Privacy, accuracy, and trust

Privacy

Unit math runs in your browser—conversion inputs are not stored remotely.

Accuracy

Verify JSX and units in target browsers and design tooling.

For design and development prototyping—not a substitute for design-system tokens.

Advertisement

Reviewed by EverydayTools Editorial Team on 2026-05-19.