Happy path, starts with 1
- Input
- 1234567893
- Expected output
- Válido
Official CMS example.
test NPI numbers for software development
A provider form, a claims import or a registration API all need NPIs for testing. This page describes a minimal fixture set, what each one exercises and the risk no generator can remove: the NPI is a public number, and a well-formed one may already have an owner.
Official CMS example.
Covers the other accepted first digit.
Good for a repeated-digits test, which some validators wrongly reject.
Keeps length and first digit correct, so only the checksum can stop it.
An NPI without its last digit is not a complete NPI.
It is the unique 10-digit identifier of US health care providers, created by the final rule of January 23, 2004 (69 FR 3434). CMS issues and maintains it through the NPPES registry. The number has no embedded meaning: it does not indicate state, specialty or provider type.
Not in the sources consulted. The CMS document describes issuance by scattering across all combinations beginning with 1 or 2, with no reserved test range. Hence the warning that a well-formed NPI may have an owner.
Up to 500 at a time, with no repeats within a batch. With a seed, the same list comes out for the same options, which helps keep fixtures stable between runs.
As text. An NPI starting with 2 reaches 2,999,999,999, above the 2,147,483,647 limit of a signed 32-bit integer, and the identifier is never used for arithmetic, only for comparison and display.
1234567893
The NPI does not reveal whether it is Type 1 (individual) or Type 2 (organization). That only shows up in the official NPPES registry.
| Digit | 8 | 0 | 8 | 4 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 3 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Double | x2 | x2 | x2 | x2 | x2 | x2 | x2 | ||||||||
| Value | 8 | 0 | 8 | 8 | 0 | 2 | 2 | 6 | 4 | 1 | 6 | 5 | 8 | 9 | 3 |
8 + 0 + 8 + 8 + 0 + 2 + 2 + 6 + 4 + 1 + 6 + 5 + 8 + 9 + 3 = 70 | mod 10 = 0
The first 5 digits (80840) are the constant prefix. Digits in alternating positions are doubled starting next to the last one, and doubles above 9 lose 9. The total must be a multiple of 10.
Everything runs in your browser. No NPI you type or generate is sent to a server, and analytics only receives the action and the overall result, never the number.