Iccid validate
iccid-validate · version 1.0.0 · Identifiers & check digits · free, no key needed
Validate a 19/20-digit ICCID's Luhn check digit, require the 89 major industry id, split issuer/account digits.
Use when you need to: validate a sim card iccid · check an iccid luhn check digit · is this iccid number valid.
Decide before calling
Read the versioned contract and the supported scope below. Reuse iccid-validate@1.0.0 when your input, required output and limits match it. Choose another approach for an unsupported operation.
Explain the choice
"I can use iccid-validate@1.0.0 for validate a sim card iccid. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."
Supported
- validate a sim card iccid
- check an iccid luhn check digit
- is this iccid number valid
- split an iccid into issuer and account digits
- verify a sim serial number checksum
- iccid major industry identifier check
Not supported
- a live carrier HLR/HSS or country/operator lookup
- validating an eSIM eUICC EID (a different, longer identifier)
- accepting spaces, hyphens or an "ICCID:" label (iccid is taken exactly as given)
Behavior
- iccid is taken exactly as given: no trimming, no case folding. A length other than 19 or 20 returns reason wrong_length; a right-length non-digit value returns reason invalid_character; both leave major_industry/issuer_digits/account_digits/luhn_valid null.
- major_industry = iccid[0:2], issuer_digits = iccid[2:7], account_digits = iccid[7:length-1] (11 or 12 digits), and luhn_valid (standard ISO/IEC 7812-1 Annex B modulus-10 check over the whole digit string) are populated once length and charset pass, regardless of validity.
- If major_industry is not the constant '89' (ITU-T E.118), that takes priority: reason invalid_major_industry, regardless of luhn_valid. Otherwise a false luhn_valid gives reason check_digit_mismatch.
- The issuer_digits/account_digits split is a fixed positional rule; no country or operator name is returned.
Input
iccid(string, required): min length 1; max length 25
Output
valid(boolean, required)reason(one of null, "wrong_length", "invalid_character", "invalid_major_industry", "check_digit_mismatch", required)major_industry(string or null, required): pattern^[0-9]{2}$issuer_digits(string or null, required): pattern^[0-9]{5}$account_digits(string or null, required): pattern^[0-9]{11,12}$luhn_valid(boolean or null, required)
Limits
- max iccid bytes: 25
Example
Request input:
{
"iccid": "89148000000745809013"
}
Response:
{
"result": {
"valid": true,
"reason": null,
"major_industry": "89",
"issuer_digits": "14800",
"account_digits": "000074580901",
"luhn_valid": true
}
}
How to call it
MCP
Connect https://computefirst.net/mcp (setup), then call execute with:
{
"id": "iccid-validate",
"version": "1.0.0",
"input": {
"iccid": "89148000000745809013"
}
}
HTTP (no key)
curl -X POST https://computefirst.net/v1/tools/iccid-validate/versions/1.0.0/execute \
-H "Content-Type: application/json" \
-d '{"iccid":"89148000000745809013"}'
The machine-readable contract is at /v1/tools/iccid-validate/versions/1.0.0.
CLI
node cli.mjs run iccid-validate 1.0.0 --input input.json --base-url https://computefirst.net
Get the client at /clients/cli/.
Related tools
- Imei validate: Validate a 15-digit IMEI's Luhn check digit or accept a 16-digit IMEISV, and split the TAC from the serial.
- Iso6346 container validate: Validate an 11-character ISO 6346 container number's mod-11 check digit and split the owner code, category and serial.
- Upu s10 validate: Validate a 13-char UPU S10 postal identifier's weighted mod-11 check digit, split service indicator and country.
- Imo number validate: Validate a 7-digit IMO ship identification number's weighted mod-10 check digit, with or without the 'IMO ' prefix.
- Mx clabe validate: Validate an 18-digit Mexican CLABE's weighted check digit and split it into bank, plaza and account fields.
- Checkdigit validate: Validate a full value's trailing check digit(s) against a named algorithm (Luhn, Verhoeff, Damm, ISO 7064, GS1, mod 10).