Skip to main content

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:

PositionFieldLengthMeaning & RuleExample
1Entity Type1 digit"1" for Individual Practitioners or "2" for Healthcare Organizations1
2 to 9Sequential Identifier8 digitsSequential identifier issued by NPPES23456789
10Check Digit1 digitLuhn 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. 1. Verify the NPI contains exactly 10 numeric digits.
  2. 2. Prepend the 5-digit virtual constant "80840" to create a 15-digit string including the check digit.
  3. 3. Working right-to-left, double the digits in even-indexed relative positions.
  4. 4. If doubled value > 9, subtract 9.
  5. 5. Sum all processed values.
  6. 6. Check digit is (10 - (Sum % 10)) % 10.
  7. 7. Valid if computed check digit matches the 10th digit.

Frequently Asked Questions