CSS Units Converter
Convert between px, rem, em, vh, vw, pt, and % units with configurable root font size and viewport settings.
Advanced Configuration
16px1rem1em12pt1pc2.0833vh1.1111vw100%Come utilizzare Convertitore Unità CSS
Insert value and starting unit
Enter the number to convert in the "Value" field and select the original unit of measurement (px, rem, em, pt, pc, vh, vw, %) from the dropdown menu.
Configure root font size and viewport as needed.
Open "Advanced Settings" to customize the root font-size (in rem), parent font-size (in em), and viewport dimensions (in vh/vw), if different from the default values (16px, as determined by the browser).
Read the table with all conversions
The result table shows the converted value in real-time for all supported units, with the original unit highlighted.
Format the value you need
Copy "Premi" next to the desired unit for copying formatted value into notes (e.g. "1.5rem"), ready to paste into your CSS.
Suggerimenti
- For responsive projects, only scale vw/vh for elements that need to scale with the viewport; text is usually preferred in rem, more predictable and accessible.
- If your project uses a non-standard root font size different from 16px, update it in "Advanced Settings" before converting values to rem.
Domande frequenti
How are units of relative measurement like rem and em converted?
Font size is calculated based on the "root font-size" (default 16px, standard HTML value), while em size is calculated based on the "parent font-size", which can be configured separately. Both values are adjustable in the "Advanced Settings" section to reflect your project.
Where do these values for viewport height and width come from?
Page open width and height are automatically read from your browser window to calculate vh and vw units. You can however override them manually in the "Advanced Settings" for simulating other devices or breakpoints.
What difference is there between pt/pc and common CSS units?
Font size (pt) and line height (pc) are typographical units inherited from printing, converted according to the CSS standard (1pt = 1/72 inch, 1pc = 12pt), assuming a reference resolution of 96 px per inch used by browsers.
Is my percentage calculation always correct for my case?
The percentage is calculated relative to the "parent font-size" set, which is the correct interpretation when using % for font size. If you're converting a value % referring to container width/height (not font), the correct reference is the parent element's dimension, not what's set here.
Are my data being sent to a server?
No, all conversions occur instantly in the browser through purely mathematical formulas, without any network call.