Japan Corporate Number (Hōjin Bangō) Validator
Validate the authenticity, format, and checksum of Japan Corporate Number (Hōjin Bangō).
About Japan Corporate Number (Hōjin Bangō) Validation
The Corporate Number (Houjin Bangou / 法人番号) is the unique 13-digit identifier assigned by Japan's National Tax Agency (NTA) to registered corporations and legal entities under the Social Security and Tax Number Act.
The structure is `[C][NNNNNNNNNNNN]`: the leading digit `C` is the check digit (1-9), computed by weighting alternating digits by 1 and 2, summing products, and evaluating `9 - (sum mod 9)`. Unlike individual My Number IDs, the Corporate Number is public fiscal data.
Anatomy & Structure of the Corporate Number (法人番号)
The Japanese Corporate Number consists of 13 digits assigned by the National Tax Agency (NTA):
| Position | Field | Length | Meaning & Rule | Example |
|---|---|---|---|---|
| 1 | Check Digit | 1 digit | Calculated via weighted Modulo 9 over the 12 base digits | 5 |
| 2 to 13 | Base Registration Number | 12 digits | Based on the commercial registry number of the corporation | 123456789012 |
Official Algorithm (Weighted Modulo 9 — NTA Japan)
Official leading check digit calculation for Japan Corporate Number:
S = Σ P[n] × (n%2 === 1 ? 1 : 2); R = S mod 9; DV = 9 - R === 9 ? 0 : 9 - R
- 1. Number the 12 base digits from n=1 (rightmost) to n=12 (leftmost).
- 2. Use weight 1 for odd positions and weight 2 for even positions.
- 3. Multiply each digit by its weight and sum into total S.
- 4. Compute remainder R = S mod 9.
- 5. If 9 - R equals 9, check digit is 0; otherwise DV = 9 - R.