converters

Free CSS Unit Converter: All 14 Units at Once

Convert px, rem, em, pt, pc, in, cm, mm, vw, vh, vmin, vmax, ch, ex - all results in one click. Custom base font, viewport dimensions, formula hints, and instant copy.

100% Free
Privacy Focused
Instant Results
Works Everywhere
CSS Unit Converter

Convert px, rem, em, pt, pc, in, cm, mm, vw, vh, vmin, vmax, ch, ex - all results in one click. Custom base font, viewport dimensions, formula hints, and instant copy.

Base font (rem / em)
px
Viewport (vw / vh / vmin / vmax)
W × H
Quick:
About This Tool

What is CSS Unit Converter?

Converting between CSS units by hand requires knowing base font size, viewport dimensions, and device resolution - and doing the math for each conversion. This CSS Unit Converter computes all 14 standard CSS units simultaneously from a single input value, using the context values you specify.

Enter a value in any unit - pixels, rem, em, pt, pc, cm, mm, inches, vw, vh, vmin, vmax, ch, or ex - and all 14 equivalents appear at once. Set the base font size (default 16px) to make rem and em conversions accurate for your project, and set the viewport width and height to get correct vw and vh results.

The most common use case is Figma-to-CSS translation. Figma and most design tools output measurements in px. Converting to rem ensures text scales with browser accessibility settings - critical for meeting WCAG 2.1 criteria on font size. A designer hands off 24px heading and you need the rem equivalent at your project's 16px base: 24 ÷ 16 = 1.5rem, confirmed immediately.

Physical units (cm, mm, in, pt, pc) are used for print stylesheets and PDFs generated from HTML. Screen resolution affects these conversions, so the tool lets you adjust DPI for accurate cross-media output.

Viewport units (vw, vh, vmin, vmax) are essential for fluid typography with clamp() and for full-height sections in mobile layouts where percentages behave differently from viewport units. The ch unit (width of the '0' character) is useful for setting input field widths by character count.

Features

Powerful Features

Everything you need in one amazing tool

All 14 CSS Units

px, rem, em, pt, pc, in, cm, mm, vw, vh, vmin, vmax, ch, ex - everything in one view.

Convert All at Once

See every unit equivalent simultaneously. No dropdowns, no back-and-forth.

Click Card to Switch

Click any result card to make it the source unit. Chain conversions instantly.

Quick Preset Chips

One-click common values: 1, 4, 8, 16, 24, 32, 48… Fill and convert in a tap.

Formula Hints

Each card shows how the conversion is calculated (÷ base font, × 0.75, = 96 px).

Custom Viewport & Screen

Set exact W × H for vw/vh/vmin/vmax, or auto-fill with your real screen dimensions.

Simple Process

How It Works

Get started in 4 easy steps

1

Enter or Pick a Value

Type a number, paste a CSS value like "1.5rem", or tap a quick preset chip to fill instantly.

2

Select Source Unit

Click the unit pill for px, rem, em, pt, vw, or any of the 14 supported units.

3

See All 14 Conversions

Every unit equivalent appears instantly - grouped as Absolute, Font-relative, and Viewport units.

4

Copy or Chain

Copy any value with one click. Or click a result card to use it as the new source and keep converting.

Why Us

Why Choose Our CSS Unit Converter?

Stand out from the competition

See Everything at Once

All 14 unit groups visible side by side. No switching tabs or adjusting dropdowns.

Click to Chain

Click any result card to instantly make it the new source. Convert across multiple unit steps effortlessly.

Preset Chips Save Time

Common spacing and typography values are one tap away. 80% of lookups covered instantly.

Learn While You Convert

Formula hints on every card show the math behind each conversion - great for developers learning CSS units.

Accurate Viewport Units

Set your exact viewport W × H, or use real screen dimensions for precise vw, vh, vmin, vmax results.

100% Private

All conversions run locally in your browser. No data sent to any server.

Use Cases

Perfect For

See how others are using this tool

Design to Code

Convert Figma/Sketch px values to rem/em for accessible CSS implementation.

Accessibility Compliance

Ensure WCAG compliance by using relative units that scale with user preferences.

Responsive Layouts

Use vh/vw for fluid typography and spacing that scales with viewport.

Stylesheet Migration

Convert entire stylesheets from px to rem for better maintainability.

Typography Systems

Build consistent typography scales using rem-based modular scales.

Cross-Browser Testing

Test how different units render across browsers and user font settings.

Frequently Asked Questions

Everything you need to know about CSS Unit Converter

Both are relative units, but they have different reference points. "rem" (root em) is always relative to the root <html> element's font size (typically 16px). "em" is relative to the parent element's font size, which can compound and become confusing. If you set font-size: 2em on an element inside another 2em element, it becomes 4× the base size. Rem avoids this cascading problem. Use rem for predictable, consistent sizing throughout your site.

Using rem respects user accessibility preferences. Users with vision impairments often increase their browser's default font size (via Settings → Font Size). With px, your text stays the same size regardless. With rem, your entire layout scales proportionally with the user's preference. This is required for WCAG accessibility compliance. Additionally, rem makes it easier to build consistent design systems - change the root font size and everything scales together.

vh (viewport height) and vw (viewport width) are percentage units based on viewport size. 1vh = 1% of viewport height, 100vh = full viewport height. They're perfect for full-screen sections, fluid typography (font-size: calc(1rem + 1vw)), and maintaining aspect ratios. Unlike %, which is relative to parent, vh/vw is always relative to the viewport. Great for responsive design but be careful on mobile where address bars can affect viewport height.

Most browsers default to 16px, so that's the standard. In your CSS, set html { font-size: 100%; } which respects user preferences rather than forcing a value. Then use rem throughout your stylesheet. Common pattern: 1rem = 16px, 0.875rem = 14px, 1.25rem = 20px. Some developers use html { font-size: 62.5%; } to make 1rem = 10px for easier math, but this breaks if users set a different base size.

Yes! You can and should use different units for different purposes. Use rem/em for font sizes and spacing to support user preferences. Use px for borders, box-shadows (1px border should always be 1 pixel). Use % for widths in grid layouts. Use vh/vw for full-height sections. Use ch (character width) for limiting text line length. Modern CSS calc() lets you combine units: calc(100vh - 60px) or calc(1rem + 2px).

The conversions use standard CSS formulas and are mathematically accurate. However, actual rendering depends on browser, OS, display settings, and user preferences. For example, rem conversions assume a 16px base font size by default, but users may have changed this in their browser settings. Viewport unit conversions depend on actual viewport dimensions. Always test your CSS in real browsers and devices, especially for critical layouts and typography.

Ready to Build Your Own Website?

Use our free tools to perfect your content and design, then build your full website yourself. No code needed, no developers to hire, no waiting.

Free forever plan
• No credit card required