A Portuguese IBAN (International Bank Account Number) packs three independent integrity checks into its 25 characters: the global ISO 7064 mod-97 checksum, a country-specific length requirement enforced by Banco de Portugal, and a pair of local check digits that pre-date the international standard. Together they make a Portuguese bank account number one of the most thoroughly self-verified in Europe.
This tool runs all three checks instantly in your browser, decodes the embedded bank code against the Banco de Portugal published registry, and tells you the precise reason an IBAN fails — whether it is the wrong length, a failed ISO checksum, or mismatched local check digits. Nothing you enter is ever transmitted to a server.
Structure of a Portuguese IBAN
A Portuguese IBAN is always 25 characters with the following anatomy:
PT 50 00070000 00123456789 05
^^ ^^ ^^^^^^^^ ^^^^^^^^^^^ ^^
| | | | Local check digits (KK)
| | | Account number — 11 digits
| | Bank code (CIB) — 8 digits
| ISO check digits — 2 digits (historically fixed at 50)
Country code — always PT
- PT — ISO 3166-1 alpha-2 country code.
- 50 — ISO check digits. Computed so that the rearranged IBAN string gives mod-97 remainder of 1. For Portugal these are almost universally “50”.
- BBBBBBBB — 8-digit CIB (Código de Identificação Bancária). The first four digits identify the bank; the second four identify the branch or product line.
- CCCCCCCCCCC — 11-digit account number assigned by the bank.
- KK — 2 Banco de Portugal local check digits computed over the 19-digit block (bank code + account number) by the same mod-97 formula.
How the three validation checks work
1. Length check
Every PT IBAN is exactly 25 characters. If your IBAN has 24 or 26 characters it fails immediately, regardless of any checksum.
2. ISO 7064 mod-97 checksum
The tool follows the standard ISO 13616 rearrangement procedure:
- Strip spaces, uppercase the string.
- Move the first four characters (PT + check digits) to the end.
- Replace each letter with its two-digit code: A=10, B=11 … Z=35.
- Fold the resulting digit string through mod-97 progressively.
- The IBAN is valid when the remainder equals 1.
For a 25-character IBAN the numeric string is about 30 digits long. The tool processes it one digit at a time so there is no risk of floating-point overflow.
3. Local check digits (Banco de Portugal)
The two digits at positions 24-25 of the full IBAN satisfy a second independent
mod-97 equation over just the 19-digit BBAN body (bank code + account number).
The expected value is 98 - mod97(bankCode + accountNumber + "PT00"). If the
stored digits differ from this expected value, the account number itself contains
an error even if the ISO layer passed.
Worked example
Consider the illustrative IBAN PT50 0002 0123 1234 5678 9015 (constructed to pass all checks — it does not correspond to a real account):
- Strip and uppercase:
PT50000201231234567890 15 - Length: 25 — correct.
- Rearrange for ISO check:
00020123123456789015PT50 - Expand letters: P=25, T=29 gives
...2529 50at the end. - Fold through mod-97: remainder = 1 — ISO checksum passes.
- Bank code:
00020123— prefix0002is not in the major-bank registry, so the tool shows the raw code without a name. - Account number:
12345678901, local check:15. - Expected local check:
98 - mod97("0002012312345678901" + "2529" + "50")— computed by the tool; if it equals15the local check also passes.
| Check | Result |
|---|---|
| Length | 25 / 25 |
| ISO mod-97 remainder | 1 |
| Local check digits | match |
| Overall | Valid |
All three rows must be green for the IBAN to be fully valid.
Bank code reference (major institutions)
| CIB prefix | Institution |
|---|---|
| 0007 | Caixa Geral de Depósitos |
| 0010 | Banco BPI |
| 0018 | Santander Totta |
| 0033 | Millennium BCP |
| 0035 | Caixa Crédito Agrícola |
| 0040 | Banco Montepio |
| 0046 | Novo Banco |
| 0897 | Banco CTT |
The tool recognises the leading four digits of the bank code and displays the institution name inline. An unrecognised prefix is not an error — it may be a smaller regional bank, a credit cooperative, or a payment institution not in the abbreviated registry used here.
Privacy and limitations
Every check runs in your browser. The IBAN you enter is never sent to any server, never logged, and never stored. “Valid” means structurally correct across all three criteria described above. It does not mean the account is open, funded, or belongs to any particular person — only Banco de Portugal or the receiving bank can confirm that.