Examples of IBANs on the internet are usually somebody's real account with a couple of digits changed, which is both uncomfortable and misleading, because a changed digit breaks the checksum and the example then fails every validator a reader tries it in. The example below is constructed instead: it belongs to nobody, its bank code is not one any bank uses, and its check digits are arithmetically correct.
The example
GB57ZZZZ99887712345678. Twenty two characters, which is the fixed length of every United Kingdom IBAN. It is not a real account: the bank code block is ZZZZ, which no UK institution uses, and the remaining digits are sequences chosen for readability. The check digits are correct for the rest of the string, so it will pass a validator that tests the arithmetic, which makes it useful for testing a form without putting a real account into somebody's logs.
Block by block
GB is the country code, telling any receiving system which country's rules apply. 57 is the check digit pair, computed over everything that follows plus the country code moved to the end. ZZZZ is the four letter bank code, which in a real IBAN is the first four letters of the bank's BIC. 998877 is where the six digit sort code sits. 12345678 is the eight digit account number. Read from the right, the last fourteen characters are exactly the domestic pair a UK payer would use.
How the check digits are worked out
Move the first four characters to the end of the string, replace each letter with a number where A is ten and Z is thirty five, read the result as one very long integer and take it modulo ninety seven. For a correct IBAN the answer is one. To generate the check digits in the first place you put zeros in their place, do the same arithmetic and subtract the remainder from ninety eight. It is deliberately simple enough that any system anywhere can implement it.
Why lengths differ between countries
The IBAN standard fixes the first four characters and lets each country define the rest, so the length follows whatever domestic identifiers that country packages. A UK IBAN is twenty two characters because a sort code and account number take fourteen. Other countries run shorter or longer. That is why a validator has to know the destination country before it can judge the length, and why a string that looks wrong to you may be perfectly correct for somewhere else.
Questions people ask about iban example
Is this a real IBAN?
No. It is constructed for illustration, with a bank code no UK institution uses. The check digits are arithmetically correct so it passes a format validator.
How long is a UK IBAN?
Twenty two characters, always. Other countries have different fixed lengths because they package different domestic identifiers.
Where is the sort code in an IBAN?
In a UK IBAN it is the six digits after the four letter bank code, followed by the eight digit account number.
Can I test a form with this example?
Yes, for format validation. It will not route a payment anywhere, which is the point of using a constructed example rather than a real account.