Example NIB
- Input
- 0002 0123 1234 5678 9015 4
- Expected output
- NIB válido, IBAN PT50 0002 0123 1234 5678 9015 4
A public example Portuguese IBAN.
Portuguese NIB vs IBAN how to calculate
In Portugal two names coexist for the same account: NIB, the national number, and IBAN, the international format. They carry the same information, and knowing the relation avoids typing errors in transfers. Paste either into the tool and it shows the other.
A public example Portuguese IBAN.
Check 87.
One digit swapped at the end.
98 minus the remainder by 97.
Test bank code 9999.
Each of the first 8 digits is multiplied by the weights 9, 8, 7, 6, 5, 4, 3, 2 and the products are added. The remainder of the division by 11 decides the ninth digit: 0 or 1 gives 0, and any other remainder r gives 11 minus r. For 204716624 the sum is 139, the remainder is 7 and the digit is 4.
As a standalone number, less and less: credit transfers and direct debits require the IBAN. But the NIB lives on inside the IBAN, which is PT50 plus its 21 digits.
Banco de Portugal documents that the IBAN check digits are always 50 for Portuguese accounts. Since the NIB already satisfies mod 97, the IBAN closes with the same value in every case.
No. It only passes format validations and leads to no account. Use it in form and import tests.
Valid NIF structure
This checks structure and arithmetic only. It does not prove the number was issued to anyone, or that the account exists.