How to use the npi number validator
- Type or paste the numbers, one on each line. Spaces and hyphens are ignored.
- Use 10 digits to test a number, or 9 digits to have the last digit worked out.
- Read the result for each line: whether the check digit works, the Luhn sum with the prefix, and the digit that would be needed.
- Copy the table or download the CSV to keep a record of what you checked.
Formula
prefix the 10 digits with 80840
run the Luhn test: from the right double every second digit, subtract 9 from results over 9, add everything
valid when the total is a multiple of 10
check digit = (10 - (Luhn sum of the first nine digits + 24) mod 10) mod 10
The constant 80840 is placed in front of the identifier before the usual Luhn test. Its digits always add the same 24 to the sum, which gives a second way to compute the check digit from the first nine digits alone.
Checking 1234567893
For the first nine digits 123456789, double every second digit from the right: 9 becomes 18, which is 9 after subtracting 9, and 7 becomes 5, 5 becomes 1, 3 becomes 6 and 1 becomes 2. Adding the other digits 8, 6, 4 and 2 gives a Luhn sum of 43.
Adding the constant 24 gives 67, and the check digit is (10 - 7) mod 10 = 3. The last digit of 1234567893 is 3, so it works. The page also shows the sum 80 for the full 14 digit string with the prefix, which is a multiple of 10 as it must be.
Why a constant prefix
The National Provider Identifier is a 10 digit number whose last digit is a Luhn check digit. The scheme computes that digit as if the number began with 80840, a prefix tied to the way the number is used in standard transactions. The prefix is never written on the identifier itself.
Because the prefix is fixed, it contributes the same amount to every sum. That is why the result is the same as the plain Luhn sum of the first nine digits plus 24, and the page shows that both routes agree.
What the test cannot tell you
A passing number is consistent, and about one in ten random numbers of the right length also pass. The test says nothing about whether a number was issued, which provider holds it or whether it is active.
Use the arithmetic to catch typing mistakes in a list before it is used. For other schemes see the Check Digit Validator and the ABA Routing Number Validator.
Assumptions and limits
- This tests the arithmetic of the 10 digits only. No registry is consulted.
- Numbers must be 9 or 10 digits after spaces and hyphens are removed.
- The constant 80840 is applied as part of the rule and is not written on the number.
- Up to 200 lines are read at once.
- Nothing typed here leaves your browser.
Frequently asked questions
Why does the constant add exactly 24?
The digits 8, 0, 8, 4 and 0 land in positions where some are doubled and some are not. Working through the doubling gives 0 + 8 + 8 + 0 + 8 = 24, and it is the same for every number.
Is the first digit of an NPI special?
The page does not test it. It checks only the Luhn arithmetic, so a number can pass here even if its first digit would not be used for an assigned identifier.
How is this different from a credit card check?
The method is the same Luhn test, but the number is first prefixed with 80840. Without the prefix a valid NPI would pass or fail the plain test in a different pattern.
Can I validate a long list?
Paste up to 200 numbers, one per line. Each gets its own row, and you can download the table as a CSV file to keep.