curatedapi

ISIN check

Check the structure and check digit of an ISIN (ISO 6166) and split it into prefix, national number and check digit.

The 12-character ISIN. Spaces, dots, hyphens and slashes are ignored, and lower-case letters are read as upper case. At most 64 characters.

Examples

Result: Wrong check digit

Valid
Whether the ISIN passes every check.
no
Normalized
The number as it was checked: separators removed, letters in upper case.
US0378331004
Problem
What is wrong, when valid is false: CHARACTERS: a character that cannot appear in this kind of number; LENGTH: the wrong number of characters; COUNTRY: an unknown or unsupported country code; FORMAT: the right length but the wrong structure; CHECK_DIGIT: the check digit or check characters do not match the rest of the number.
CHECK_DIGIT
Message
The result in a sentence, naming the rule that failed.
The check digit is 4, but the first eleven characters give 5.
Prefix
The first two letters.
US
Prefix country
The country the prefix stands for, when it is an ISO 3166 code. Prefixes such as XS (international securities) are not countries.
United States
Nsin
The national securities number.
037833100
Check digit
The last character.
4
Expected check digit
The check digit the first eleven characters give.
5

Calculator check/isin@1.

How it is calculated

turn each letter into two digits (A = 10 … Z = 35), then apply the Luhn rule: double every second digit from the right, add all digits, and the total must be a multiple of 10

Checks an International Securities Identification Number as ISO 6166 defines it: a two-letter prefix, a nine-character national securities number and a check digit worked out with the Luhn rule after the letters are turned into numbers.

  • The number is checked by arithmetic alone. Nothing is looked up, so a valid result means the number is well formed, not that the account, company or security exists.

References

Results follow each calculator's documented rules and the sources listed. They are not financial, tax or legal advice. Check that the rules fit your case before you rely on a result. See the terms.

Use it from your code

POST /v1/calc/check/isinVersion 1
curl https://api.curatedapi.com/v1/calc/check/isin \
  -H "Authorization: Bearer $CURATEDAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "number": "US0378331004"
  }'
The same call in Python
import os

import requests

payload = {
    "number": "US0378331004",
}
response = requests.post(
    "https://api.curatedapi.com/v1/calc/check/isin",
    headers={"Authorization": f"Bearer {os.environ['CURATEDAPI_KEY']}"},
    json=payload,
    timeout=10,
)
print(response.json()["result"])
The same call in JavaScript
const payload = {
    "number": "US0378331004",
};
const response = await fetch("https://api.curatedapi.com/v1/calc/check/isin", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.CURATEDAPI_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify(payload),
});
console.log((await response.json()).result);

MCP tool calc_check_isin at https://mcp.curatedapi.com. Inputs, outputs and errors in the API reference.

Put it on your website

<div data-curatedapi-widget="check/isin" data-key="capi_public_…"></div>
<script src="https://widgets.curatedapi.com/v1/widget.js" async></script>

Use a public key registered for your site. Calculations are billed like API calls. How widgets work.

Related calculators

Add this calculator to your website

Paste two lines into your page and your visitors get this calculator. Each use counts as one call on your plan, the same as the API.

Free for up to 1,000 uses a month. 50,000 uses a month cost $9.00 on the Starter plan.