# Isin validate

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

Validate a 12-character ISIN's ISO 6166 Luhn check digit and parse its country prefix, NSIN and NSIN scheme.

**Use when you need to: validate an isin · check isin check digit · is this isin number valid.**

## Decide before calling

Read the [versioned contract](/v1/tools/isin-validate/versions/1.0.0) and the supported scope below. Reuse `isin-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 `isin-validate@1.0.0` for validate an isin. 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 isin
- check isin check digit
- is this isin number valid
- isin checksum validator
- verify international securities identification number
- parse isin country code and nsin
- check digit for a stock isin
- does this isin belong to cusip or sedol

## Not supported

- looking up which company or security an ISIN actually identifies
- computing an ISIN from a country and national number (see isin-compute-from-nsin)
- validating the CUSIP or SEDOL check digit embedded in the NSIN (see cusip-validate / sedol-validate)

## Behavior

- isin must be exactly 12 characters: no case folding, no separators, no trimming. Any other length is reason wrong_length, checked first.
- Positions 1-2 (country_prefix), 3-11 (nsin) and 12 (check_digit) are the raw positional substrings whenever isin is exactly 12 characters, regardless of whether the per-position charset or the check digit itself is valid.
- Positions 1-2 must be A-Z; positions 3-11 must be A-Z or 0-9; position 12 must be 0-9, else reason invalid_character.
- country_prefix must be an officially assigned ISO 3166-1 alpha-2 code (data_version) or one of the ISIN-specific prefixes XS, EU, XA, XB, XC, XD, else reason unknown_country_prefix.
- Check digit: expand country_prefix+nsin (11 characters) to decimal digits (a digit stays itself; A=10 ... Z=35), concatenate, then Luhn: double every digit at an odd 1-based position from the right (the rightmost expanded digit is doubled, subtracting 9 from any doubled value over 9); the expected check digit is (10 - sum mod 10) mod 10. A mismatch is reason check_digit_mismatch.
- nsin_type is "cusip" for raw country_prefix US or CA, "sedol" for GB, IE, IM, JE or GG, and "other" otherwise; it depends only on the raw prefix, never on charset or check-digit validity, and is null only when length already failed.
- valid is true only when length, charset, country recognition and the check digit all pass, in that order; only one reason is ever returned.

## Input

- `isin` (string, required): min length 1; max length 12

## Output

- `valid` (boolean, required)
- `reason` (one of null, "wrong_length", "invalid_character", "unknown_country_prefix", "check_digit_mismatch", required)
- `country_prefix` (string or null, required): min length 2; max length 2
- `nsin` (string or null, required): min length 9; max length 9
- `check_digit` (string or null, required): min length 1; max length 1
- `nsin_type` (one of null, "cusip", "sedol", "other", required)
- `data_version` (string, required)

## Limits

- max isin bytes: 12

## Example

Request input:

```json
{
  "isin": "US0378331005"
}
```

Response:

```json
{
  "result": {
    "valid": true,
    "reason": null,
    "country_prefix": "US",
    "nsin": "037833100",
    "check_digit": "5",
    "nsin_type": "cusip",
    "data_version": "iso3166-1-2026-09-28"
  }
}
```

## How to call it

### MCP

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

```json
{
  "id": "isin-validate",
  "version": "1.0.0",
  "input": {
    "isin": "US0378331005"
  }
}
```

### HTTP (no key)

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

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

### CLI

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

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

## Related tools

- [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.
- [Cusip validate](/tools/cusip-validate): Validate a 9-character CUSIP's Modulus 10 Double Add Double check digit and parse its issuer, issue and PPN marker.
- [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.
- [Imo number validate](/tools/imo-number-validate): Validate a 7-digit IMO ship identification number's weighted mod-10 check digit, with or without the 'IMO ' prefix.
- [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.
- [Sedol validate](/tools/sedol-validate): Validate a 7-character SEDOL's weighted modulus 10 check digit and report whether it is a legacy all-numeric code.
