CSS Units Converter — px, rem, em, vw, vh, %, pt
Configuration
Pixels
Root EM
Parent EM
Viewport Width %
Viewport Height %
Percentage
Points (print)
Quick Reference — Common px Values
| px | rem | em | vw | vh | % | pt |
|---|---|---|---|---|---|---|
| 4 | 0.25 | 0.25 | 0.277778 | 0.444444 | 25 | 3 |
| 8 | 0.5 | 0.5 | 0.555556 | 0.888889 | 50 | 6 |
| 12 | 0.75 | 0.75 | 0.833333 | 1.333333 | 75 | 9 |
| 14 | 0.875 | 0.875 | 0.972222 | 1.555556 | 87.5 | 10.5 |
| 16 | 1 | 1 | 1.111111 | 1.777778 | 100 | 12 |
| 18 | 1.125 | 1.125 | 1.25 | 2 | 112.5 | 13.5 |
| 20 | 1.25 | 1.25 | 1.388889 | 2.222222 | 125 | 15 |
| 24 | 1.5 | 1.5 | 1.666667 | 2.666667 | 150 | 18 |
| 32 | 2 | 2 | 2.222222 | 3.555556 | 200 | 24 |
| 40 | 2.5 | 2.5 | 2.777778 | 4.444444 | 250 | 30 |
| 48 | 3 | 3 | 3.333333 | 5.333333 | 300 | 36 |
| 64 | 4 | 4 | 4.444444 | 7.111111 | 400 | 48 |
| 80 | 5 | 5 | 5.555556 | 8.888889 | 500 | 60 |
| 96 | 6 | 6 | 6.666667 | 10.6667 | 600 | 72 |
| 128 | 8 | 8 | 8.888889 | 14.2222 | 800 | 96 |
What This Tool Does
CSS Units Converter — px, rem, em, vw, vh, %, pt is built for deterministic developer and agent workflows.
Convert between CSS units instantly: px, rem, em, vw, vh, %, and pt. Configurable root font-size, parent font-size, and viewport dimensions. Free,.
Use How to Use for execution steps and FAQ for constraints, policies, and edge cases.
Last updated:
This tool is provided as-is for convenience. Output should be verified before use in any production or critical context.
Agent Invocation
Best Path For Builders
Dedicated API endpoint
Deterministic outputs, machine-safe contracts, and production-ready examples.
Dedicated API
https://aidevhub.io/api/css-units-converter/ OpenAPI: https://aidevhub.io/api/openapi.yaml
Unified Runtime API
https://aidevhub.io/api/tools/run/?toolId=css-units-converter&a=...
GET and POST are supported at /api/tools/run/ with identical validation and limits.
Limit: req / s, input max 256 KB.
How to Use CSS Units Converter — px, rem, em, vw, vh, %, pt
- 1
Enter a value and select your source unit
Type any number into the Value field and choose your starting unit (px, rem, em, vw, vh, %, or pt). All other units update instantly as you type.
- 2
Configure root and parent font-size
Set the root font-size (default 16px) to get accurate rem conversions. Set the parent font-size for em and % calculations — useful when you know the inherited font-size in your component tree.
- 3
Set viewport dimensions for vw/vh
Enter the target viewport width and height for accurate vw and vh conversions. Default is 1440×900 (typical desktop). Change to 375×812 for iPhone layout work.
- 4
Copy any converted value
Use the Copy control on any unit card to copy the numeric value to your clipboard — ready to paste directly into your CSS.
- 5
Use the quick reference table
Scroll down to see a reference table of common px values (4px–128px) converted to all units. Helpful for building consistent spacing scales.