Skip to content
Schedule a Call

Convert CSS units

Convert CSS units between px, rem, em, %, vh and vw with your own root font size and viewport. Click any result to copy. Free, in your browser.

  • Files never leave your device
  • Free, no sign-up
  • No watermark
Loading tool…

About CSS Unit Converter

Convert a value between every common CSS unit at once. Enter a number, pick its unit and instantly see it in px, rem, em, percent, vh and vw. Set your root font size, parent font size and viewport dimensions so the results match your project, and click any result to copy it. It is the quickest way to turn a design file’s pixel values into scalable rem units.

How to use CSS Unit Converter

  1. 1

    Enter a value and choose its unit.

  2. 2

    Adjust root font, parent font and viewport size if needed.

  3. 3

    Read all conversions.

  4. 4

    Click a result to copy it.

Why use this tool

  • px, rem, em, %, vh and vw.
  • Custom root and parent font size.
  • Custom viewport width and height.
  • Click to copy any result.
  • Quick reference values.

Frequently asked questions

1rem equals the root font size, which is 16px in most browsers by default.

rem is relative to the root and predictable. em is relative to the parent and compounds when nested.

rem respects the user’s browser font size, which improves accessibility.

They are percentages of the viewport height and width. 50vw is half the screen width.

No. Everything is processed in your browser tab. Nothing you type or paste is sent to CodeMites or any other server.

Yes. There is no account, no watermark and no usage limit. The tool runs in your own browser, so there is no server cost to charge you for.

Yes. It runs in any modern browser on Android and iOS as well as on Windows, macOS and Linux, with nothing to install.

Yes. The CSS Unit Converter gives you plain CSS, so it works in stylesheets, CSS modules, styled-components or inline styles in any framework.

Yes. Anything you create with this tool is yours to use in personal and commercial work, with no attribution required.