✳tools.stBrowse tools
◈ Processed on your device
◈

CSS px, rem and viewport units

Convert pixels, rem, vw and vh with explicit root and viewport sizes.

Free

Convert pixels, rem, vw and vh with explicit root and viewport sizes. Supply the root font size and viewport dimensions to calculate equivalent CSS length values. The selected input unit is first converted to pixels, then into the other units.

◈ Local processingFree

How to use

  1. Enter your text, values, or image.
  2. Adjust the options and run the tool.
  3. Copy or download your result.

Worked example

Example input

Value: 16
Input unit: px
Root font px: 16
Viewport width px: 1280
Viewport height px: 800

Example result

{
  "px": 16,
  "rem": 1,
  "vw": 1.25,
  "vh": 2
}

Limitations and details

Values use your supplied dimensions rather than measuring a page; em, percentages and dynamic viewport variants are not supported.

Inputs and options

Value
Number
Input unit
px / rem / vw / vh
Root font px
Number · Minimum: 1 · Maximum: 200
Viewport width px
Number · Minimum: 1 · Maximum: 10000
Viewport height px
Number · Minimum: 1 · Maximum: 10000

Frequently asked questions

Is this tool free and private?

Yes. All 300 tools are free in this phase. Processing happens in your browser; your input and files are not sent to our servers.

Related tools