InputTestHub

Portugal IBAN Validator

Validates a Portuguese IBAN: the mod-97 checksum, the 25-character length and the structure, with the bank code identified.

Security Nothing uploaded No sign-up Free, unlimited
Security tool
Enter something above.
In short A Portuguese IBAN is exactly 25 characters: PT, two check digits, then 4 digits, then 4 digits, then 11 digits, then 2 digits — so the 4 characters after the check digits are the bank code — 0002 in the example — the next 4 are the four-digit branch, 0123, and the remaining 13 are the account, 1234567890154. A Portuguese IBAN carries the domestic NIB unchanged: four digits of bank, four of branch, eleven of account and two national check digits at the end. So it is checked twice, by two different rules. The checksum is ISO 7064 MOD-97-10: move the first four characters to the end, turn each letter into its position in the alphabet plus nine, and read the result as one long number, which must leave remainder 1 when divided by 97. That catches every single-character mistake and almost every swap of two neighbouring characters, which is what it was designed for and why an IBAN is worth checking before you pay rather than after. What it cannot do is tell you the account exists, is open, or belongs to the person you think — a random string of the right shape passes about once in 97 tries, and no amount of arithmetic reaches into a bank. This page runs entirely in your browser, so the number you type is not sent anywhere.

How to use the Portugal IBAN Validator

  1. Paste the Portuguese IBAN — spaces and dashes are fine.
  2. Read the three checks: mod-97, length and structure.
  3. If it fails, the page says which check failed and what that usually means.

About the Portugal IBAN Validator

Checks a Portuguese IBAN three ways — checksum, length and structure — and says which of the three failed when one does, because they mean different things.

What people use it for

  • Checking a Portuguese IBAN before sending money to it.
  • Finding the bank code inside an IBAN you have been given.
  • Confirming a Portuguese number was typed or pasted correctly.

Details

Length25 characters, always
Structure4!n4!n11!n2!n after the check digits
In wordsPT, 2 check digits, then 4 digits, then 4 digits, then 11 digits, then 2 digits
Bank code4 characters — 0002 in the example
ExamplePT50 0002 0123 1234 5678 9015 4
Check digitsAlways between 02 and 98. 00, 01 and 99 cannot occur
PrivacyThe arithmetic runs in your browser. Nothing you type is sent anywhere

The maths behind it

This tool uses ISO 7064 MOD-97-10 — move the first four characters to the end, replace each letter with its position plus nine, and a valid IBAN leaves remainder 1 on division by 97. On top of that, Portuguese IBANs are exactly 25 characters and follow 4!n4!n11!n2!n. Every intermediate value is shown on screen, so the result can be checked by hand.

Three checks, reported separately on purpose. A length error means a character is missing or extra, a structure error means a letter sits where a digit belongs, and a checksum failure with both of those right means a genuine typo inside the number — most often two neighbouring characters swapped.

Where this tool stops

It checks arithmetic and shape. It cannot tell you the account exists or who it belongs to, it does not look the bank up, and it does not verify any national check digits Portugal may use inside its own account number — those are separate rules, computed differently, and passing mod-97 says nothing about them.

Frequently asked questions

How many characters is a Portuguese IBAN?
Exactly 25, with no exceptions. After the two check digits the structure is 4!n4!n11!n2!n — 4 digits, then 4 digits, then 11 digits, then 2 digits. A number of any other length is not a Portuguese IBAN, whatever else about it looks right.
What are the last two digits of a Portuguese IBAN?
The NIB check digits — Portugal’s own checksum, computed on the twenty-one digits before them and separate from the two IBAN check digits at the front.
Where is the bank code in a Portuguese IBAN?
The 4 characters after the check digits are the bank code — 0002 in the example — the next 4 are the four-digit branch, 0123, and the remaining 13 are the account, 1234567890154.
Does a valid checksum mean the account exists?
No, and this is the thing worth taking away. Mod-97 proves the number is internally consistent — that it was probably typed correctly. It says nothing about whether the account is open, or whose it is. A random string of the right length passes about once in every 97 attempts. Only the bank can confirm the rest.
Is it safe to paste an IBAN here?
The checking happens in your browser and the number is never sent to a server — there is no request to make one. An IBAN is not a secret the way a card number is, since it is printed on every invoice you send, but it is still yours, and it does not leave your machine here.
Is the Portugal IBAN Validator free, or is there a paid tier?
Free, unlimited, and no email address required. You can use it a hundred times a day and nothing changes.
Can you see what I put into this page?
No. The Portugal IBAN Validator runs entirely in your browser using JavaScript. Because the work happens locally, the page also keeps working if your connection drops, and closing the tab is all it takes to discard everything.
How is the result calculated?
It uses ISO 7064 MOD-97-10 — move the first four characters to the end, replace each letter with its position plus nine, and a valid IBAN leaves remainder 1 on division by 97. On top of that, Portuguese IBANs are exactly 25 characters and follow 4!n4!n11!n2!n. The full working is printed under the result, so you can follow every step rather than trusting a black box.
Who is the Portugal IBAN Validator for?
The jobs it is built for: checking a Portuguese IBAN before sending money to it. Finding the bank code inside an IBAN you have been given. Confirming a Portuguese number was typed or pasted correctly. It is built for exactly those cases rather than being a general-purpose tool with this bolted on.
What are the limits of the Portugal IBAN Validator?
It checks arithmetic and shape. It cannot tell you the account exists or who it belongs to, it does not look the bank up, and it does not verify any national check digits Portugal may use inside its own account number — those are separate rules, computed differently, and passing mod-97 says nothing about them. Knowing where a tool stops being trustworthy matters more than the cases where it works.
What are the reference figures here?
Length is 25 characters, always. Structure is 4!n4!n11!n2!n after the check digits. In words is PT, 2 check digits, then 4 digits, then 4 digits, then 11 digits, then 2 digits. These are printed on the page itself, so you do not have to take them on trust.
Can I use the Portugal IBAN Validator on mobile?
Yes. The page is responsive and the page works in Chrome, Safari, Firefox, Edge and Samsung Internet on both Android and iOS. There is no app to install and nothing to sign into.

Related security tools

All 100
01

Password Strength Checker

Estimates password entropy and crack time, and identifies the specific weaknesses in what you…

02

Hash Generator

Generates MD5, SHA-1, SHA-256, SHA-384 and SHA-512 hashes of any text, all at once.

03

MD5 Hash Generator

Generates an MD5 hash of any text or string, with optional HMAC and uppercase output.

05

SHA-1 Hash Generator

Generates SHA-1 hashes, still required by some legacy systems and Git object addressing.

06

SHA-512 Hash Generator

Generates SHA-512 hashes for checksums, signatures and archival fingerprints. Runs in your…

09

AES Text Encryption

Encrypts and decrypts text with AES-GCM 256-bit using a password, entirely in your browser.

10

XOR Cipher Tool

Applies a repeating-key XOR to text or hex, the operation behind many simple obfuscation…