Portuguese IBAN generator

IBANs in Portugal have 25 characters and start with PT. The one below is random, follows the national structure and passes the MOD-97 check, so form validation accepts it. No bank issued it.

Format

PT50003564887255359244254

  1. Country PT
  2. Check digits 50
  3. Bank code 0035
  4. Branch code 6488
  5. Account number 72553592442
  6. National check 54
Generate a list Up to 100 IBANs, as CSV, JSON, SQL or plain text

In CSV, JSON and SQL, every IBAN segment (bank, branch, account, check digits) gets its own column.

MOD-97 valid

Realistic mode: real bank code, random account number. No bank issued this IBAN, but it could match a real account by chance. Never use it for payments.

Check an IBAN

Paste an IBAN from any country to check its length, format and check digits.

Without JavaScript, this form opens the full IBAN validator.

Full IBAN validator

Portuguese IBAN format

Length, pattern and the position of each segment in PT IBANs, with a sample IBAN.

IBAN length 25
BBAN length 21
BBAN pattern 21n
Structure PTkk bbbb ssss ccccccccccc kk
Example, electronic PT50000201231234567890154
Example, print PT50 0002 0123 1234 5678 9015 4
Letters in the BBAN None, digits only
National check digits Positions 24–25
IBAN check digits Always PT50
SEPA Member (EPC list, December 2025)
Source SWIFT IBAN Registry, Release 102 (June 2026)

Position by position

Segment Positions Length Example
Country 1–2 2 PT
Check digits 3–4 2 50
Bank code 5–8 4 0002
Branch code 9–12 4 0123
Account number 13–23 11 12345678901
National check 24–25 2 54

In the pattern, n stands for a digit, a for an uppercase letter and c for a letter or digit. The number before each letter is how many characters that block has.

National check digits

Besides the two IBAN check digits, PT IBANs carry national check digits inside the BBAN, at positions 24–25. They come from the domestic account number and follow a national rule.

They use ISO 7064 MOD 97-10, the same method as the IBAN check digits, applied to the digits in front of them: 98 minus the remainder of that number, times 100, divided by 97.

This generator calculates them with the official algorithm, in both modes, so validators that check them accept the IBANs on this page.

Because of this check, the whole BBAN always leaves the same remainder when divided by 97, so every valid PT IBAN has the same IBAN check digits: PT50.

Source: Banco de Portugal, NIB.

How national check digits work

Real bank codes in realistic mode

In realistic mode, the default, the generator takes the bank code from this list and keeps the account number random, so no bank issued these IBANs. With Realistic off, the bank code is random too.

Bank Bank code
Caixa Geral de Depósitos 0035
Millennium bcp 0033
Novo Banco 0007
Santander Totta 0018
Banco BPI 0010
Crédito Agrícola 0045
Banco Montepio 0036

The branch code stays random.

What to test with PT IBANs

  • Accept exactly 25 characters for PT, after removing spaces, and reject 24 or 26.
  • Digits only after the check digits: a validator for PT should reject any letter there.
  • For a negative test of the national check, change the character at position 24 and recalculate the IBAN check digits (the validator suggests them). The IBAN then passes MOD-97 but fails the national check.
  • Ready-made invalid values for negative tests: PT50000201231234567890155 (last character changed, MOD-97 fails) and PT5000020123123456789015 (one character missing).
  • Bank directory checks: by default the generator uses real bank codes such as 0033 (Millennium bcp), and random ones with Realistic off, so you can test a known and an unknown bank.

About IBANs in Portugal

Portuguese IBANs have 25 characters, all digits: a 4-digit bank code, a 4-digit branch code, an 11-digit account number and two national check digits. Those 21 digits are the domestic account number, called the NIB.

Questions about IBANs in Portugal

How long is an IBAN in Portugal?

25 characters: the country code PT, two check digits and a national part (BBAN) of 21 characters.

What does an IBAN from Portugal look like?

For example PT50 0002 0123 1234 5678 9015 4. That is the print format, in groups of four. Forms and files usually take it without spaces: PT50000201231234567890154.

Can Portuguese IBANs contain letters?

No. After the check digits, PT IBANs contain only digits: the BBAN pattern is 21n.

Where is the bank code in Portuguese IBANs?

The bank code, at positions 5–8: 0002 in the registry example. The branch code is at positions 9–12 (0123). By default (realistic mode) the generator uses real bank codes, such as 0035 for Caixa Geral de Depósitos.

Will a test IBAN for Portugal pass validation?

It passes the checks most forms run: country code, length, character format and MOD-97 check digits. The national check digits inside the BBAN are computed with the official algorithm, so a validator that also checks them accepts this IBAN. In realistic mode, the default, the bank code is real too, so a bank directory check accepts it. An account lookup or a payee name check will not confirm it, because the account number is random.

Can I use a generated Portuguese IBAN to sign up for a service or receive money?

No. It is test data that no bank issued to you. Money sent to it is rejected or, if the number happens to belong to someone, reaches a stranger, and using it for a sign-up, a free trial or a direct debit is misuse. Your own IBAN is in your banking app and on your statements.

Other countries

Pick a country to see its IBAN format and get a valid test IBAN. The number next to each code is the IBAN length.