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
For Development & Testing Purposes Only - Synthetic Mock Data
Settings
1 valueGenerates 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).
Examples
Legacy 15-digit NPWP
01.855.081.4-412.000Valid — Luhn check digit 4, KPP 412, head-office branch 000The dots and hyphen are separators only; the digits are what the check runs on.
2024 16-digit NPWP
0018550814412000Valid — leading 0 plus the 15-digit numberNon-individual taxpayers use this form; individuals use their NIK as the NPWP instead.
Wrong check digit
01.855.081.5-412.000Invalid — 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
Pick the NPWP layout
Choose the 15-digit legacy format or the 16-digit 2024 format; the latter is for non-individual taxpayers.
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.
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
| Part | 15-digit layout |
|---|---|
| Prefix | — |
| Taxpayer type | Digits 1-2 |
| Serial | Digits 3-8 |
| Check digit | Digit 9 (Luhn) |
| Tax office (KPP) | Digits 10-12 |
| Branch | Digits 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
Related tools
Indonesia NIK Generator
Generate synthetic 16-digit Indonesian NIK numbers with a valid region code and an encoded birth date.
VAT Number Generator
Generate VAT numbers for EU, UK, Switzerland, Norway and global tax integration testing.
Tax Number Generator
Generate valid tax identification numbers for testing (TR, US, SG, etc.)
National Identity Generator
Generate and validate national ID numbers for testing (TR, US, DE, UK, SA, AE, QA, KW, CA, ES, BR, FR, IT, NL, SE, NO, EG, SG)
Tax ID Validator
Auto-detect and validate VAT, EIN, TIN and GST identifiers with batch checksum reporting.