DevTools Logo

NPI Generator

US NPI Generator

Generate 10-digit US National Provider Identifiers with the CMS Luhn check digit (prefix 80840) — synthetic test data only

Runs in your browser

For Development & Testing Purposes Only - Synthetic Mock Data

Settings

1 value

Generates one value with a valid checksum. Press ⌘/Ctrl+Enter for a fresh one.

Generated value

No value yet

Set options, then press Generate.

Generated values are valid in shape but randomized (Test Data).

Legal Disclaimer: Generated data is for software testing and validation purposes only (e.g. verifying input masks, form validation, or database seeding). It is randomly generated and not taken from any real record, but a random value can coincidentally match a real, issued number, so never use it in real applications, payments, KYC or official forms. Using it to impersonate real people or for any fraudulent activity is illegal. DevTools accepts no liability for how generated data is used.

    Examples

    Individual NPI

    Input
    Entity Type 1 · Generate
    Output
    1234567893

    The CMS worked example: the Luhn check over 80840 + 123456789 produces the final 3.

    Organization NPI

    Input
    Entity Type 2 · Generate
    Output
    2345678900

    Starting with 2 marks an organization; the trailing 0 is the computed check digit.

    Invalid check digit

    Input
    1234567890
    Output
    Invalid — check digit is 0 but the first 9 digits require 3

    The validator isolates the checksum failure instead of rejecting the value as malformed.

    About this tool

    The NPI Generator produces 10-digit National Provider Identifiers with a valid CMS check digit. The first digit is 1 for an individual (Entity Type 1) or 2 for an organization (Entity Type 2), and the 10th digit is a Luhn check digit computed over the CMS card-issuer prefix 80840 followed by the first nine digits.

    Generation randomizes the first nine digits and derives the check digit, so every result passes the CMS check. The validator recomputes the Luhn check and reports the expected digit when a pasted value fails. The CMS worked example, 1234567893, is a useful sanity check for your own implementation.

    NPIs generated here are synthetic fixtures, not provider identities, and a random value can coincide with an entry in the public NPPES registry: never use them on real applications, KYC checks, healthcare claims, or identity documents, and DevTools accepts no liability for how generated data is used. Everything runs locally in your browser.

    What this tool does not do

    • The tool validates the CMS check digit only; it does not query NPPES or confirm that a provider exists.
    • The first digit indicates entity type in the generated data but is not proof of a provider's real classification.
    • Random values can coincidentally match an NPI already in the public registry.
    • Formatting characters are ignored on input, so whitespace differences will not fail validation.

    How to use this tool

    1. Choose an entity type

      Select Entity Type 1 for an individual NPI that starts with 1, or Entity Type 2 for an organization NPI that starts with 2.

    2. Generate a value

      Click Generate to create one 10-digit number and append the Luhn check digit computed over 80840 plus the first nine digits.

    3. Copy or validate

      Copy the result to an EHR or claims fixture, or switch to Validate to check a pasted NPI and see the expected check digit.

    Use cases

    Provider onboarding fixtures

    Seed clinician and organization records in staging with NPIs that pass CMS checksum validation.

    Claims and FHIR tests

    Populate provider identifier fields in claims messages or FHIR resources during integration testing.

    Checksum regression tests

    Compare your own implementation against the 1234567893 worked example and a deliberately broken value.

    NPI rules

    PartRule
    Length10 digits
    First digit1 = individual (Entity Type 1), 2 = organization (Entity Type 2)
    Check digit10th digit = Luhn over "80840" + first 9 digits
    Worked example1234567893 is valid
    CharactersDigits only; spaces and hyphens are ignored when validating

    The CMS check digit catches transcription errors; it does not prove that a provider exists.

    Common mistakes

    Mistake:Assuming a valid NPI identifies a real provider

    Fix:The check digit validates the number only; confirm providers against NPPES in real workflows.

    Mistake:Starting an organization NPI with 1

    Fix:Entity Type 2 NPIs start with 2; only individuals use 1.

    Mistake:Computing Luhn over the nine digits alone

    Fix:The CMS check includes the 80840 prefix before the first nine digits.

    Frequently asked questions

    Are these real NPIs?

    They are synthetic fixtures for QA and development, not provider identities. A random value can coincide with an entry in the public NPPES registry, so never use one for real applications, KYC checks, or healthcare claims; DevTools accepts no liability for how it is used.

    How is the NPI check digit calculated?

    The 10th digit is a Luhn check digit computed over the CMS prefix 80840 followed by the first nine digits, as described in the CMS check-digit requirement.

    What does the first digit of an NPI mean?

    A 1 marks an individual provider (Entity Type 1) and a 2 marks an organization (Entity Type 2); generation follows the type you select.

    Does passing validation mean the provider exists?

    No. Validation recomputes the check digit only. Confirming a provider requires a lookup in the NPPES registry.

    Why is 1234567893 used as an example?

    It is the worked example from the CMS check-digit documentation, so it is a reliable way to test your own Luhn implementation.

    References & standards