NPI Validator

Check whether a 10-digit National Provider Identifier is valid. The validator runs the official ISO 7812 (Luhn mod-10) check-digit test in your browser — nothing is sent to a server. A valid check digit does not guarantee the NPI has been issued, so confirm it in the registry.

How the NPI check digit works

The NPI uses the same check-digit scheme as a credit card (ISO 7812 / Luhn mod-10). To validate a number, drop the last digit (the check digit), prepend the fixed CMS prefix 80840 to the remaining 9 digits, run the Luhn sum, and confirm the result matches the check digit you removed.

  1. Take the NPI without its 10th digit: 123456789.
  2. Prepend the CMS prefix 80840: 80840123456789.
  3. Double every second digit from the right; if a doubled value exceeds 9, subtract 9.
  4. Add all the digit values, then compute (10 − sum mod 10) mod 10.
  5. That result is the check digit — it must equal the NPI’s 10th digit.

Worked example: 1234567893

Digit Doubled? Adds to sum
8 no 8
0 yes (×2) 0
8 no 8
4 yes (×2) 8
0 no 0
1 yes (×2) 2
2 no 2
3 yes (×2) 6
4 no 4
5 yes (×2) 1
6 no 6
7 yes (×2) 5
8 no 8
9 yes (×2) 9
Sum 67
Check digit = (10 − 67 mod 10) mod 10 3

The computed check digit is 3, which matches the last digit of 1234567893 — so this NPI passes validation.

A valid check digit is not proof of issuance. This test only confirms the number is well-formed. To confirm an NPI belongs to a real, active provider, look it up: confirm an NPI in the registry.

Frequently asked questions

What makes an NPI number valid?
A valid NPI is exactly 10 digits, starts with 1 or 2, and passes the ISO 7812 Luhn check-digit test computed over the constant 80840 plus the first 9 digits.
Does a valid NPI mean the provider exists?
No. This tool only checks the mathematical check digit. A checksum-valid number may never have been issued. Look the NPI up to confirm it belongs to a real provider in NPPES.
What is the 80840 prefix used in NPI validation?
80840 is the ISO 7812 issuer identifier assigned to CMS for the health-industry number. It is prepended to the first 9 NPI digits before the Luhn calculation, but it is not part of the NPI itself.
Why do NPI numbers start with 1 or 2?
CMS currently issues NPIs from ranges that begin with 1 or 2. The check-digit math would accept other leading digits, so this tool also flags numbers that pass the checksum but fall outside the issued range.