Every company, government body and registered organisation in Japan carries one public 13-digit identifier: the corporate number (法人番号, hōjin bangō), assigned by the National Tax Agency under the 2013 My Number Act. Unlike the personal My Number, it is deliberately public — searchable by anyone in the NTA’s corporate number publication site. Its first digit is a check digit, which means a single mistyped or transposed digit is mathematically detectable before you ever query the registry. This validator runs that official check locally in your browser.
Anatomy of the 13 digits
| Part | Digits | Meaning |
|---|---|---|
| Check digit | 1st (leftmost) | Computed from the other 12 by the modulo-9 rule |
| Base number | 2nd–13th | For companies: the 12-digit commercial registry number from the Legal Affairs Bureau; for other bodies: an NTA-assigned serial |
Because the base of a company’s corporate number is its commercial registry number, the corporate number links the tax identity and the corporate registry identity of the same entity — one of the design goals of the system.
The official check-digit algorithm
Number the 12 base digits 1 to 12 starting from the rightmost digit. Then:
weight Qn = 1 when position n is odd
= 2 when position n is even
sum = Σ (digit at position n) × Qn
check = 9 − (sum mod 9)
The number is valid when this computed value equals the actual first digit.
Note a subtlety of the formula: check ranges from 1 to 9 — a corporate
number can never begin with 0, because 9 − (sum mod 9) never yields zero.
That is itself a quick sanity check: any 13-digit “corporate number” starting
with 0 is invalid on sight.
Worked example, digit by digit
Take the base 010401089914 (positions 12 down to 1, left to right):
| Position (from right) | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Digit | 0 | 1 | 0 | 4 | 0 | 1 | 0 | 8 | 9 | 9 | 1 | 4 |
| Weight | 2 | 1 | 2 | 1 | 2 | 1 | 2 | 1 | 2 | 1 | 2 | 1 |
| Product | 0 | 1 | 0 | 4 | 0 | 1 | 0 | 8 | 18 | 9 | 2 | 4 |
Weighted sum = 47. Then 47 mod 9 = 2, and the check digit is
9 − 2 = 7. The full valid corporate number is therefore
7010401089914. If an invoice showed 8010401089914, the validator
would flag it immediately — some digit was misread or mistyped.
Why validation matters since the invoice system
Japan’s qualified invoice system (適格請求書等保存方式, the “invoice
seido”) took effect on 1 October 2023. To claim input credits for
consumption tax, a business must hold qualified invoices showing the
supplier’s invoice registration number — the letter T followed by the
supplier’s 13 digits, e.g. T7010401089914. Details are on the NTA’s
invoice-system pages,
and registered issuers can be confirmed on the
qualified invoice issuer publication site.
The practical workflow accounting teams have converged on:
- Checksum first (this tool) — catches transcription errors instantly, offline, before any lookup.
- Registry lookup second — confirm the entity exists and matches the supplier’s name at houjin-bangou.nta.go.jp.
- Invoice-issuer lookup third — confirm the
Tnumber is an active registered issuer, since registration can be revoked or surrendered.
A checksum-valid number that fails step 3 is the case that costs money: the invoice will not support an input-tax credit.
What the check digit can and cannot catch
The alternating 1-2 weighting over modulo 9 detects all single-digit errors except substitutions that differ by 9 in weighted value — in practice nearly every typo — and most adjacent transpositions (swapping two neighbouring digits changes the weighted sum unless the two digits are equal or their difference is a multiple of 9 under the weight swap). It cannot detect a completely different but internally valid number, a valid number attached to the wrong company, or a deregistered entity. Structural validity is necessary, never sufficient.
Edge cases
Branches have no separate number — one corporate number covers the whole
legal entity, unlike some countries’ per-establishment IDs. Sole
proprietors have no corporate number at all; their invoice registration
numbers are T + a 13-digit NTA-assigned number that deliberately does
not reveal their My Number — such numbers still pass the same checksum.
Dissolved companies keep their number in the registry with a closure
record, so an old invoice can still be cross-checked. And when pasting from
Japanese documents, watch for full-width digits (123…) — convert them
to half-width ASCII digits before validating; this tool accepts both.
Sources
- NTA Corporate Number Publication Site (法人番号公表サイト)
- NTA — qualified invoice system (インボイス制度)
- Qualified Invoice Issuer Publication Site
Everything runs locally in your browser — nothing you type is uploaded. A valid checksum confirms internal consistency only; always confirm the entity in the official registry for due-diligence purposes.