Input
16px (root font size 16px)
Output
1rem / 1em (when parent font size is also 16px)
Design Tools
Convert among px, rem, em, pt, vw, vh, and %. Customize root font size, parent font size, and viewport size for responsive work and design-to-code handoff.
Favorite this tool
No favorite storage mode has been selected.
Quick actions
Copy this tool URL or open the system share sheet on a supported device.
设计配色
Input
16px (root font size 16px)
Output
1rem / 1em (when parent font size is also 16px)
rem is relative to the root font size; em is relative to the parent font size. This tool uses the root and parent values you enter.
Percentages depend on context. Here they are approximated from your baselines; confirm against the real layout before shipping.
Tools
Continue with another translated tool for a nearby task.
CSS Clamp Generator
From min/max viewport widths and a target size range, compute a clamp() formula for fluid font sizes, spacing, and other lengths that scale with the viewport.
Pixel Ruler
Draw a horizontal or vertical pixel ruler on the page. Adjust length and tick spacing, and view window size plus device pixel ratio to check CSS pixel measurements against layouts and mockups.
Aspect Ratio Calculator
Compute and lock an aspect ratio in your browser. Derive a ratio from width and height, or change one side while the other stays proportional. Includes common presets and a preview for cropping, video frames, and responsive layouts.