Skip to content

IBAN format · PT

Portugal IBAN format: 25 characters.

Portugal IBANs have 25 characters: the country code PT, two check digits and a 21-character BBAN, the national account number, laid out as 4!n4!n11!n2!n.

Portugal IBAN structure

PT50000201231234567890154
Country code
PT
Check digits
50
Bank code
0002
Branch code
0123
Account
12345678901
National check digits
54
Parts of a Portugal IBAN and their positions
PositionsPartIn the example
1–2Country codePT
3–4Check digits50
5–8Bank code0002
9–12Branch code0123
13–23Account12345678901
24–25National check digits54

The BBAN, segment by segment

The registry writes the BBAN in SWIFT notation: n is a digit, a an upper-case letter, c a letter or digit, and the ! means a fixed length. 4!n4!n11!n2!n reads:

The Portugal BBAN format, segment by segment
PositionsNotationHoldsExample
5–84!n4 digitsBank code0002
9–124!n4 digitsBranch code0123
13–2311!n11 digitsAccount number12345678901
24–252!n2 digitsNational check digits54

Portugal IBAN example

PT50 0002 0123 1234 5678 9015 4 is the sample the SWIFT IBAN Registry publishes for Portugal: a well-formed IBAN for showing the format, not a real account. Written electronically it has no spaces (PT50000201231234567890154); on paper it is printed in groups of four.

Its check digits, worked through with ISO 7064 mod 97-10:

  1. Move the country code and check digits to the end

    000201231234567890154PT50
  2. Replace each letter with two digits (A = 10 … Z = 35)

    P = 25, T = 29

    000201231234567890154252950
  3. Divide that number by 97 and keep the remainder

    Remainder 1. A valid IBAN always leaves 1, so the check digits are right.

  4. Where the check digits come from

    Put 00 in their place (PT00…), repeat steps 1–3: remainder 48. The check digits are 98 − 48 = 50.

SEPA

Portugal is in the Single Euro Payments Area, so SEPA credit transfers and direct debits can reach PT IBANs; whether a given bank takes part is up to that bank.

What the format can and can’t tell you

  • Valid means the structure and check digits are right — not that the account exists or can receive payments.
  • National check digits inside the BBAN (e.g. the French RIB key, or the Spanish, Belgian and Italian CIN digits) are not verified.
  • Bank and branch codes are read from their positions; they are not looked up in a bank directory.

Check PT IBANs from code or an AI agent

REST · GET · no key
curl -s 'https://payopskit.com/api/v1/iban/PT50000201231234567890154'
MCP · tools/call · validate_iban
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "validate_iban",
    "arguments": {
      "iban": "PT50000201231234567890154"
    }
  }
}
Response (JSON)
{
  "input": "PT50000201231234567890154",
  "iban": "PT50000201231234567890154",
  "print": "PT50 0002 0123 1234 5678 9015 4",
  "valid": true,
  "country": {
    "code": "PT",
    "name": "Portugal",
    "sepa": true,
    "sepaNote": null
  },
  "checkDigits": "50",
  "expectedCheckDigits": "50",
  "length": {
    "actual": 25,
    "expected": 25
  },
  "bban": "000201231234567890154",
  "bbanFormat": "4!n4!n11!n2!n",
  "bankCode": "0002",
  "branchCode": "0123",
  "parts": [
    {
      "label": "Country code",
      "value": "PT",
      "start": 0,
      "end": 2,
      "kind": "country"
    },
    {
      "label": "Check digits",
      "value": "50",
      "start": 2,
      "end": 4,
      "kind": "check"
    },
    {
      "label": "Bank code",
      "value": "0002",
      "start": 4,
      "end": 8,
      "kind": "bank"
    },
    {
      "label": "Branch code",
      "value": "0123",
      "start": 8,
      "end": 12,
      "kind": "branch"
    },
    {
      "label": "Account",
      "value": "12345678901",
      "start": 12,
      "end": 23,
      "kind": "account"
    },
    {
      "label": "National check digits",
      "value": "54",
      "start": 23,
      "end": 25,
      "kind": "national-check"
    }
  ],
  "checks": {
    "characters": true,
    "country": true,
    "length": true,
    "bbanFormat": true,
    "checksum": true
  },
  "errors": [],
  "notes": [
    "Valid means the structure and check digits are right — not that the account exists or can receive payments.",
    "National check digits inside the BBAN (e.g. the French RIB key, or the Spanish, Belgian and Italian CIN digits) are not verified."
  ]
}

The MCP server is at /mcp (Streamable HTTP, no key); the API and MCP docs show how to connect Claude, Cursor or VS Code.

From a national account number: GET /api/v1/iban/check-digits?country=PT&bban=… or the MCP tool compute_iban_check_digits computes the check digits and the whole IBAN.

Other 25-character IBANs

The same length doesn’t mean the same structure: compare the BBAN formats. All IBAN formats and lengths

Source: the SWIFT IBAN Registry (ISO 13616), transcribed and checked against each country’s registry example; the positions of bank and branch codes are given only where the registry’s are well established. The SWIFT IBAN Registry is the authority. Informational only.