Free CSS Unit Converter
px, rem, em, vh, vw.
Convert between CSS units instantly. Set your base font size and viewport dimensions, then convert px to rem, rem to px, em, vh and vw in one click. No accounts. No uploads. No telemetry.
Settings
Convert from
16px1rem1em1.7778vh1.1111vwFree online CSS unit converter — px to rem, rem to px, em, vh, vw
Enter any CSS value and instantly convert it to all major CSS units. Useful for responsive design, accessibility-friendly font sizing, and converting design specs into CSS values.
The base font size setting controls rem and em conversions — the default is 16px which matches most browser defaults. Viewport dimensions affect vh and vw calculations.
Common use cases
- Convert px values from Figma designs into rem for accessible CSS
- Check what a rem value equals in px for a given base font size
- Convert fixed px layouts to fluid vh/vw units for responsive design
- Quickly verify unit math when writing Tailwind or vanilla CSS
FAQ
What is the default base font size?
Most browsers default to 16px. This means 1rem = 16px unless overridden in your CSS with html { font-size: ...}.
What is the difference between rem and em?
rem is relative to the root font size. em is relative to the parent element's font size. This tool uses the base font size for both.
How are vh and vw calculated?
vh and vw are percentages of the viewport height and width. The default viewport used is 1440 × 900px — adjust as needed for your target screen.