px to em converter
Convert px to em for any base font size. The output updates as you type, with a reference table covering common values.
Try 16, 24, 1.5
Updates as you type
Default 16px — change to match your project.
How to use this tool
- 1Enter the px value you want to convert.
- 2Set your project’s base font size (defaults to 16px).
- 3Read the em equivalent and copy it for your stylesheet.
About this tool
em is relative to the parent element’s font size. It’s useful inside components when you want spacing or sizing to scale with local typography rather than the root. With a default 16px parent, 1em = 16px.
Related tools
px to rem converter
Convert px to rem with a custom base font size. Instant, accurate, no signup.
rem to px converter
Convert rem to px with a custom base font size. Instant, accurate, no signup.
em to px converter
Convert em to px with a custom base font size. Instant, accurate, no signup.
CSS gradient generator
Build a linear CSS gradient with two color stops and any angle. Live preview and copy-to-clipboard CSS.
Box-shadow generator
Tune offset, blur, spread, color, and inset to build a CSS box-shadow. Live preview and copy CSS.
Frequently asked questions
Short answers to what people ask most.
What base font size does this converter use?
Why use em instead of px?
Is the conversion exact?
Does this work offline?
Reviewing work with your team?
Pin comments directly on a live website or design — no extension, no setup.
