# Imei validate

`imei-validate` · version 1.0.0 · Identifiers & check digits · free, no key needed

Validate a 15-digit IMEI's Luhn check digit or accept a 16-digit IMEISV, and split the TAC from the serial.

**Use when you need to: validate an imei number · check a phone's imei check digit · is this imeisv valid.**

## Decide before calling

Read the [versioned contract](/v1/tools/imei-validate/versions/1.0.0) and the supported scope below. Reuse `imei-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 `imei-validate@1.0.0` for validate an imei number. 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 an imei number
- check a phone's imei check digit
- is this imeisv valid
- split imei into tac and serial number
- verify a device identifier luhn check digit
- imei vs imeisv difference check

## Not supported

- a live GSMA TAC / device-model lookup
- validating an MEID or ESN (different, non-3GPP schemes)
- accepting spaces, hyphens or a "IMEI:" label (imei is taken exactly as given)

## Behavior

- imei is taken exactly as given: no stripping of spaces/hyphens, no case folding. A length other than 15 or 16 returns reason wrong_length; a right-length non-digit value returns reason invalid_character; both leave format/tac/serial/check_digit null.
- tac = imei[0:8], serial = imei[8:14], populated once length and charset pass, regardless of validity.
- Length 15 (format imei): check_digit = imei[14]; the Luhn check digit of the 14-digit payload imei[0:14] is compared to it, giving valid/reason check_digit_mismatch.
- Length 16 (format imeisv): the last 2 digits are a software version, never exposed and never Luhn-checked; check_digit is always null and valid is always true (reason null) once length and charset pass.

## Input

- `imei` (string, required): min length 1; max length 24

## Output

- `valid` (boolean, required)
- `reason` (one of null, "wrong_length", "invalid_character", "check_digit_mismatch", required)
- `format` (one of null, "imei", "imeisv", required)
- `tac` (string or null, required): pattern `^[0-9]{8}$`
- `serial` (string or null, required): pattern `^[0-9]{6}$`
- `check_digit` (string or null, required): pattern `^[0-9]$`

## Limits

- max imei bytes: 24

## Example

Request input:

```json
{
  "imei": "490154203237518"
}
```

Response:

```json
{
  "result": {
    "valid": true,
    "reason": null,
    "format": "imei",
    "tac": "49015420",
    "serial": "323751",
    "check_digit": "8"
  }
}
```

## How to call it

### MCP

Connect `https://computefirst.net/mcp` ([setup](/docs#connect)), then call `execute` with:

```json
{
  "id": "imei-validate",
  "version": "1.0.0",
  "input": {
    "imei": "490154203237518"
  }
}
```

### HTTP (no key)

```sh
curl -X POST https://computefirst.net/v1/tools/imei-validate/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"imei":"490154203237518"}'
```

The machine-readable contract is at [/v1/tools/imei-validate/versions/1.0.0](/v1/tools/imei-validate/versions/1.0.0).

### CLI

```sh
node cli.mjs run imei-validate 1.0.0 --input input.json --base-url https://computefirst.net
```

Get the client at [/clients/cli/](/clients/cli/).

## Related tools

- [Iccid validate](/tools/iccid-validate): Validate a 19/20-digit ICCID's Luhn check digit, require the 89 major industry id, split issuer/account digits.
- [Iso6346 container validate](/tools/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](/tools/upu-s10-validate): Validate a 13-char UPU S10 postal identifier's weighted mod-11 check digit, split service indicator and country.
- [Npi validate](/tools/npi-validate): Validate a 10-digit US National Provider Identifier using the Luhn formula with the constant 80840 healthcare prefix.
- [Iban validate](/tools/iban-validate): Validate an IBAN's country, registry length, BBAN structure and MOD 97-10 check digits, and parse its bank/branch code.
- [Vin validate](/tools/vin-validate): Validate a 17-char VIN's mod-11 check digit, split WMI/VDS/VIS, and give the model-year candidates for the year code.
