PX to REM Converter: CSS Units, VW, VH & Tailwind

Convert px and rem with custom root, element, and viewport sizes plus em, %, pt, vw, vh, Tailwind references, CSS snippets, and history.

Default browser root is 16px.
CSS: font-size: 1rem;

Convert to all units

REM (rem)1
EM (em)1
Percent (%)100
Points (pt)12
Picas (pc)1
Inches (in)0.1667
Centimeters (cm)0.4233
Millimeters (mm)4.2333
Viewport width (vw)0.8333
Viewport height (vh)1.4815

Tailwind spacing (root 16px)

rempxCopy
0.5rem8px
1rem16px
1.5rem24px
2rem32px
2.5rem40px
3rem48px
3.5rem56px
4rem64px
5rem80px
6rem96px
8rem128px
10rem160px
12rem192px
14rem224px
16rem256px
20rem320px
24rem384px

Tailwind breakpoints (root 16px)

Namerempx
sm40rem640px
md48rem768px
lg64rem1024px
xl80rem1280px
2xl96rem1536px

Common font sizes (root 16px)

pxrem
8px0.5rem
10px0.625rem
12px0.75rem
14px0.875rem
16px1rem
18px1.125rem
20px1.25rem
24px1.5rem
32px2rem
40px2.5rem
48px3rem
64px4rem
96px6rem
128px8rem

History

No saved conversions yet.

PX to REM converter features

  • Convert px and rem in either direction with a configurable root size
  • Compare rem, em, %, pt, pc, in, cm, mm, vw, and vh in one live grid
  • Set element font size and viewport dimensions for context-aware results
  • Use precision controls, root presets, swap/reset, copy buttons, and CSS snippets
  • Reference Tailwind spacing, breakpoints, and common typography sizes
  • Save recent conversions locally with explicit validation for invalid roots

PX to REM converter FAQ

How is a pixel value converted to rem?

Divide the pixel value by the root font size. For example, 32px ÷ 16px = 2rem. Change the root input when your design system uses a different html font size.

What is the difference between rem and em?

rem is relative to the root element's font size, while em is relative to the element's computed font size or inherited parent context. This converter lets you supply both root and element sizes.

How are vw and vh calculated?

vw is a percentage of viewport width and vh is a percentage of viewport height. Enter the viewport dimensions to make those results match your target layout.

Infinio Tools
© 2026 Infinio Labs