2007-August 2018
For devices released before September 2018 (
Apple TV 4K and earlier,
Apple Watch Series 3 and earlier,
iPad (6th generation) and earlier,
iPad mini 4 and earlier,
iPhone X and earlier, and
iPod touch (6th generation) and earlier), the method to calculate is the following:
- Get the 11- or 12-character long serial number (exactly like it is written in the Settings app)
- On iPhone 4 and newer, get the ECID in decimal, no leading zeroes. On earlier devices, get the IMEI number (without spaces, empty string for iPod touch and Wi-Fi model iPads)
- Get the Wi-Fi MAC address (letters in lower case, including colons); for the iPod touch first generation use "00:00:00:00:00:00"
- Get the Bluetooth MAC address (letters in lower case, including colons)
- Calculate a SHA1 hash of these.
The basic formula for this is below:
On the
Verizon iPhone 4 up to
iPhone X (inclusive):
UDID = SHA1(serial + ECID + wifiMac + bluetoothMac)
Prior devices:
UDID = SHA1(serial + IMEI + wifiMac + bluetoothMac)