Transform alternating digits
Starting at the right edge of the 18-digit body, double every other digit. Keep the digits between them unchanged.
Transparent checksum math for developers and QA
Generate the final check digit from an 18-digit ICCID body or validate a complete 19-digit SIM or eSIM identifier. Inspect every doubled digit, contribution, sum, and remainder.
Calculator / 01
The input length selects the mode automatically.
The calculator module does not send the identifier to this site's processing server. A checksum pass verifies Luhn math only—not ICCID conformance, SIM existence, ownership, activation, or network access. Privacy boundary →
Paste 18 digits to generate the final digit, or 19 digits to compare the supplied checksum with the expected value.
For the current 19-digit E.118 ICCID structure, the first 18 digits form the body and the last digit is the Luhn checksum. The alternating transformation is anchored at the body's rightmost digit.
891011234567890123
72
(10 − 72 mod 10) mod 10 = 8
8910112345678901238
Starting at the right edge of the 18-digit body, double every other digit. Keep the digits between them unchanged.
When doubling produces a value above 9, subtract 9. For example, 9 becomes 18 and contributes 9 to the sum.
Add all transformed contributions. The check digit is the value required to make the final total divisible by 10.
Portable reference / 03
Both implementations use the same right-to-left parity as the live calculator and return the nineteenth digit for an 18-digit body.
function iccidCheckDigit(body) {
if (!/^\d{18}$/.test(body)) {
throw new TypeError("Use an 18-digit string");
}
let sum = 0;
let shouldDouble = true;
for (let index = body.length - 1; index >= 0; index -= 1) {
let digit = Number(body[index]);
if (shouldDouble) {
digit *= 2;
if (digit > 9) digit -= 9;
}
sum += digit;
shouldDouble = !shouldDouble;
}
return String((10 - (sum % 10)) % 10);
}
def iccid_check_digit(body: str) -> str:
if len(body) != 18 or not body.isdigit():
raise ValueError("Use an 18-digit string")
total = 0
for offset, char in enumerate(reversed(body)):
digit = int(char)
if offset % 2 == 0:
digit *= 2
if digit > 9:
digit -= 9
total += digit
return str((10 - total % 10) % 10)
| 18-digit body | Expected digit | Complete 19-digit value |
|---|---|---|
| 891011234567890123 | 8 | 8910112345678901238 |
| 894412345678901234 | 8 | 8944123456789012348 |
| 894912340000000001 | 2 | 8949123400000000012 |
| 890000000000000000 | 3 | 8900000000000000003 |
Implementation rule: keep ICCIDs as strings, not integers or floating-point values. String storage preserves every digit and avoids JavaScript's unsafe-integer range for 19-digit identifiers.
Primary reference
The current ITU-T E.118 recommendation defines a 19-digit PAN for ICCID numbering and requires the telecommunications major industry identifier 89. This calculator exposes the Luhn calculation separately: a checksum pass without 89 is valid math, not a conformant ICCID.
Generate complete test batches, inspect the UICC file representation, or audit an imported list with browser-side ICCID calculation modules.
FAQ / 04
Clear answers about input length, the Luhn method, telecom prefixes, validation limits, and privacy.
Starting at the rightmost digit of the 18-digit body, double every other digit, subtract 9 from products above 9, and add the contributions. The check digit makes the final total divisible by 10.
It confirms that the digits satisfy the checksum formula. It does not prove that a SIM exists, is active, belongs to a carrier, or can access a network.
Enter 18 digits when you want the calculator to generate the final check digit. Enter a complete 19-digit value when you want to validate its supplied final digit.
The major industry identifier 89 is assigned for telecommunication purposes. The calculator still shows the checksum for other digit strings but flags the missing telecom prefix.
The ICCID calculator module normalizes input, calculates checksums, copies results, and creates JSON in the browser without sending the identifier to this site's processing server. The page still loads site files and Google advertising and consent services; see the methodology page for the exact boundary.