Reverse engineer Android spacing

PX to DP Converter

Turn pixel values from dense screens, screenshots, and exported assets back into Android dp so you can keep your spacing system consistent.

Android Unit Tool

PX to DP Converter

Convert raw pixel measurements back into Android dp units so you can turn screenshots, exported assets, and QA findings into reusable layout tokens.

Android density presets
Converted value
48dp

48px / (160/160) = 48dp

Active factor
1x

Pixel multiplier against the mdpi baseline.

Current target
160dpi

Useful for Android device and asset density checks.

Quick reference table

Common values converted using your active DPI.

Live update
pxdp
4px4dp
8px8dp
12px12dp
16px16dp
20px20dp
24px24dp
32px32dp
44px44dp
48px48dp
64px64dp

More Mobile Dev Tools

Best use cases

Use px to dp conversion when a screenshot review says a button looks 96px tall on a device, but you want to know the reusable Android token behind that measurement.

Why dp matters

dp keeps components visually consistent across screens. Converting pixels back into dp is one of the quickest ways to move from observation into an actual design-system value.