Android App MakerHTML & URL to APK
Free tool · runs in your browser

Android dp to px converter (every density)

Convert density-independent pixels to real pixels for every Android density bucket — or the other way round.

DensitydpiScalepxdp

In a WebView app, 1 CSS pixel = 1 dp at default zoom — so font-size:16px renders like 16 sp.

The formula

px = dp × (dpi ÷ 160). mdpi (160 dpi) is the baseline where 1 dp = 1 px. A 48 dp touch target is 144 px on an xxhdpi phone.

Launcher icon sizes

DensityLegacy icon (48 dp)Adaptive layer (108 dp)
mdpi48 px108 px
hdpi72 px162 px
xhdpi96 px216 px
xxhdpi144 px324 px
xxxhdpi192 px432 px

App makers generate all of these from one square image — give them 512 px or larger.

Sizing a web app for Android phones

Most Android phones report a CSS width between 360 and 412 px. Design for 360 px first, keep tap targets at least 48 px tall (Android's guideline is 48 dp), and use at least 16 px body text — the same rules Material Design uses for native apps.

Questions people ask

How many px is 1 dp?

1 px at mdpi, 1.5 at hdpi, 2 at xhdpi, 3 at xxhdpi, 4 at xxxhdpi.

Is sp the same as dp?

At the default font size, yes. sp also scales with the user's font-size setting.