DevTools Logo

Indonesia NPWP Generator

Indonesia NPWP Generator

Generate Indonesian NPWP tax numbers in the 15-digit and 16-digit layouts with the Luhn check digit — 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

    Legacy 15-digit NPWP

    Input
    01.855.081.4-412.000
    Output
    Valid — Luhn check digit 4, KPP 412, head-office branch 000

    The dots and hyphen are separators only; the digits are what the check runs on.

    2024 16-digit NPWP

    Input
    0018550814412000
    Output
    Valid — leading 0 plus the 15-digit number

    Non-individual taxpayers use this form; individuals use their NIK as the NPWP instead.

    Wrong check digit

    Input
    01.855.081.5-412.000
    Output
    Invalid — check digit (9th) is 5 but the first 8 digits require 4 (Luhn)

    Only the 9th digit differs, so the length and separator handling still pass.

    About this tool

    The Indonesia NPWP Generator produces Indonesian taxpayer numbers in both layouts. The legacy form is 15 digits written XX.XXX.XXX.X-XXX.XXX: a 2-digit taxpayer type, a 6-digit serial, a check digit in position 9, a 3-digit tax office (KPP) code and a 3-digit branch code where 000 means head office. The 2024 form is 16 digits: individuals use their NIK, and other taxpayers prefix the 15-digit number with 0.

    The 9th-digit check follows the Luhn rule, but that rule is community-documented rather than officially published, so treat it as a well-established convention rather than an authority statement. The validator accepts either length, requires a leading 0 on the 16-digit form and recomputes the Luhn digit, reporting the expected value when it fails.

    These numbers are synthetic test data for QA and development: never use them on real applications, KYC checks, tax filings, 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 9th-digit Luhn rule is community-documented and not officially published.
    • The 16-digit form for individuals is the NIK, which this tool does not validate; use the NIK tool.
    • The validator checks length and the check digit, not whether the tax office or branch exists.
    • Generated KPP codes are random within the numeric range rather than drawn from a published office list.

    How to use this tool

    1. Pick the NPWP layout

      Choose the 15-digit legacy format or the 16-digit 2024 format; the latter is for non-individual taxpayers.

    2. Generate a value

      Click Generate to create one number with a taxpayer type, a serial, a Luhn check digit, a KPP code and a head-office branch code.

    3. Validate or copy

      Switch to Validate to accept either length and recompute the check, or copy the result and download it as .txt.

    Use cases

    Tax form fixtures

    Fill NPWP fields in Indonesian invoicing and vendor forms with values that pass the Luhn check.

    Format migration tests

    Cover both the 15-digit and 2024 16-digit layouts in the same form flow.

    Checksum comparison

    Verify your Luhn implementation against 01.855.081.4-412.000 and a variant with a changed 9th digit.

    NPWP layouts

    Part15-digit layout
    Prefix—
    Taxpayer typeDigits 1-2
    SerialDigits 3-8
    Check digitDigit 9 (Luhn)
    Tax office (KPP)Digits 10-12
    BranchDigits 13-15; 000 = head office

    The Luhn rule for the 9th digit is community-documented, not officially published.

    Common mistakes

    Mistake:Rejecting the 16-digit form for individuals

    Fix:Individuals use the NIK, so validate those with the NIK rules rather than the NPWP Luhn check.

    Mistake:Assuming the 9th digit check is official

    Fix:The Luhn rule is community-documented; keep it configurable if your integration depends on it.

    Mistake:Stripping the branch code

    Fix:Digits 13-15 are part of the number; 000 marks the head office but other values are valid branches.

    Frequently asked questions

    Are these real Indonesian NPWPs?

    No. They are synthetic fixtures for QA and development, never for real applications, KYC checks, tax filings, or identity documents; DevTools accepts no liability for how generated data is used.

    What is the difference between the 15-digit and 16-digit formats?

    The legacy form is 15 digits in XX.XXX.XXX.X-XXX.XXX layout. The 2024 form uses 16 digits: individuals use their NIK, and other taxpayers prefix the 15-digit number with 0.

    Is the 9th-digit check officially published?

    No. The Luhn rule for position 9 is community-documented rather than published by the tax authority, so treat it as a widely used convention and keep it configurable if a system depends on it.

    What does a branch code of 000 mean?

    Digits 13 to 15 carry the branch; 000 marks the head office, while other values are valid branch registrations.

    Why does the tool not validate a 16-digit individual NPWP?

    For individuals the 16-digit form is the NIK, which has no checksum and follows different rules; use the NIK tool for those values.

    References & standards