NPI Validator
Validate USA NPIs online. Perfect for integration and QA software testing.
How NPI validation works
The validator checks if the input is exactly 10 digits. It then prepends the virtual country code prefix '80840' to form a 15-digit calculation base.
It performs the standard Luhn Módulo 10 algorithm over these 15 digits. If the final sum modulo 10 equals zero, the identifier is mathematically correct.
Anatomy & Structure of NPI (10 Digits)
The US National Provider Identifier issued under HIPAA comprises 10 numeric digits:
| Position | Field | Length | Meaning & Rule | Example |
|---|---|---|---|---|
| 1 | Entity Type | 1 digit | "1" for Individual Practitioners or "2" for Healthcare Organizations | 1 |
| 2 to 9 | Sequential Identifier | 8 digits | Sequential identifier issued by NPPES | 23456789 |
| 10 | Check Digit | 1 digit | Luhn Modulo 10 check digit computed using virtual prefix "80840" | 6 |
NPI Validation Algorithm (Luhn with "80840" Virtual Prefix)
The CMS/HIPAA specification computes check digits using Luhn formula prefixed with 80840:
CheckDigit = (10 - (LuhnSum("80840" + NPI_Base) % 10)) % 10
- 1. Verify the NPI contains exactly 10 numeric digits.
- 2. Prepend the 5-digit virtual constant "80840" to create a 15-digit string including the check digit.
- 3. Working right-to-left, double the digits in even-indexed relative positions.
- 4. If doubled value > 9, subtract 9.
- 5. Sum all processed values.
- 6. Check digit is (10 - (Sum % 10)) % 10.
- 7. Valid if computed check digit matches the 10th digit.