San Marino IBAN generator

IBANs in San Marino have 27 characters and start with SM. 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

SM23J0328709800797962823495

  1. Country SM
  2. Check digits 23
  3. National check J
  4. Bank code 03287
  5. Branch code 09800
  6. Account number 797962823495
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

San Marino IBAN format

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

IBAN length 27
BBAN length 23
BBAN pattern 1a5n5n12n
Structure SMkk x bbbbb sssss cccccccccccc
Example, electronic SM86U0322509800000000270100
Example, print SM86 U032 2509 8000 0000 0270 100
Letters in the BBAN Position 5: always a letter
National check digits Position 5
Same structure as Italy (IT)
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 SM
Check digits 3–4 2 86
National check 5 1 U
Bank code 6–10 5 03225
Branch code 11–15 5 09800
Account number 16–27 12 000000270100

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, SM IBANs carry national check digits inside the BBAN, at position 5. They come from the domestic account number and follow a national rule.

This is the CIN, a check letter. Each of the other 22 characters of the BBAN gets a value from a table, one table for odd and one for even positions. The sum divided by 26 leaves a remainder from 0 to 25, which becomes a letter from A to Z.

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

Source: Banca Centrale della Repubblica di San Marino (ABI standard).

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 Branch code
Banca Agricola Commerciale 03034 09800
Banca di San Marino 08540 09803
Banca Sammarinese di Investimento 03287 09800
Cassa di Risparmio della Repubblica di San Marino 06067 09808

What to test with SM IBANs

  • Accept exactly 27 characters for SM, after removing spaces, and reject 26 or 28.
  • Letters are required at position 5. Test lowercase input too, and convert it to uppercase before you validate.
  • For a negative test of the national check, change the character at position 5 and recalculate the IBAN check digits (the validator suggests them). The IBAN then passes MOD-97 but fails the national check.
  • Same structure as Italy (IT). The country code is part of the MOD-97 calculation, so a valid SM IBAN with another country code in front must fail.
  • Ready-made invalid values for negative tests: SM86U0322509800000000270101 (last character changed, MOD-97 fails) and SM86U032250980000000027010 (one character missing).
  • Bank directory checks: by default the generator uses real bank codes such as 08540 (Banca di San Marino), and random ones with Realistic off, so you can test a known and an unknown bank.

About IBANs in San Marino

San Marino's IBANs use the Italian layout: 27 characters, starting with a CIN control letter, then a 5-digit ABI bank code, a 5-digit CAB branch code and a 12-character account number. San Marino is not in the European Union but is part of SEPA.

Questions about IBANs in San Marino

How long is an IBAN in San Marino?

27 characters: the country code SM, two check digits and a national part (BBAN) of 23 characters.

What does an IBAN from San Marino look like?

For example SM86 U032 2509 8000 0000 0270 100. That is the print format, in groups of four. Forms and files usually take it without spaces: SM86U0322509800000000270100.

Can San Marino IBANs contain letters?

Yes. SM IBANs always have uppercase letters at position 5: U in the registry example.

Where is the bank code in San Marino IBANs?

The bank code, at positions 6–10: 03225 in the registry example. The branch code is at positions 11–15 (09800). By default (realistic mode) the generator uses real bank codes, such as 03034 for Banca Agricola Commerciale.

Will a test IBAN for San Marino 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 San Marino 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.