UI Unit Converter

PX, REM, EM, DP, SP, PT, VW/VH Unit Converter. Pixel conversion and responsive design resolution (DPI) calculator for Web, Android, and iOS development.

About UI Unit Converter

The UI Unit Converter is a free, browser-based tool that converts a single value between Web (px, rem, em, vw, vh), Android (dp, sp), and iOS (pt) units side by side. It runs entirely in your browser, so the numbers you enter never leave your device.

It is built for front-end and mobile developers and designers who need to translate a measurement from a design spec into the right unit for each platform. Type a value into any field and every other field updates at once, using px as the shared physical-pixel anchor.

You can tune the assumptions behind each conversion: the web root and parent font sizes plus viewport width and height, the Android pixel density (ldpi through xxxhdpi) and font scale, and the iOS scale factor (@1x, @2x, @3x). Changing any setting recalculates all units immediately.

All calculations happen locally with simple ratio formulas, so there is no sign-in, upload, or server processing. Results follow common platform baselines (for example 1rem = 16px, 1dp = 1px at mdpi, 1pt = 1px at @1x) and are meant as a practical reference rather than a device-exact measurement.

Frequently asked questions

How do I convert px to rem, dp, or pt?
Enter your value in the px field and the rem, em, vw, vh, dp, sp, and pt fields fill in automatically. You can also type into any of those fields to convert back to px and every other unit.
What is the difference between dp and sp on Android?
dp is a density-independent layout unit (px = dp x density), while sp is the text unit that also responds to the user's font scale (px = sp x density x font scale). The converter lets you set both the density and the font scale.
Are my inputs sent anywhere?
No. The tool runs fully in your browser and performs every calculation locally, so nothing you type is uploaded or stored on a server.