PX to EM and EM to PX - PX to EM and EM to PX, single values or in bulk

by•
Convert CSS px to em and em to px instantly, one value at a time or a whole list in bulk. Set your base font size so the em math is actually correct (not a naive 16px guess), paste your values, and copy clean CSS output. Runs in your browser. No signup, nothing stored.

Add a comment

Replies

Best
Maker
📌
Hey Product Hunt 👋 Most px/em converters I found online either only went one direction, or quietly assumed em always means 16px, which isn't how em actually works, it's relative to the parent element's font size. So I built one that asks for your base font size upfront and gets the math right, in both directions. The bulk mode came out of a real annoyance: converting a handful of values one at a time in a browser tab while migrating a stylesheet is tedious. This lets you paste a whole list and get every converted value back at once. It's one tool in CSS Toolkit, a set of free CSS utilities I keep adding to. No signup, no account, runs entirely in your browser. Would love to hear if there's a format for the bulk input (CSV, one-per-line, straight from a CSS file) that would make this more useful for how you actually work.