Moroccan IBAN generator

IBANs in Morocco have 28 characters and start with MA. 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

MA62178906292884839777408662

  1. Country MA
  2. Check digits 62
  3. Bank code 17890629
  4. Account number 2884839777408662
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: digits only. There are no verified bank codes for this country yet, so the bank code stays random. 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

Moroccan IBAN format

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

IBAN length 28
BBAN length 24
BBAN pattern 24n
Structure MAkk bbbb bbbb cccccccccccccccc
Example, electronic MA64011519000001205000534921
Example, print MA64 0115 1900 0001 2050 0053 4921
Letters in the BBAN None, digits only
National check digits None
Same structure as Poland (PL)

Position by position

Segment Positions Length Example
Country 1–2 2 MA
Check digits 3–4 2 64
Bank code 5–12 8 01151900
Account number 13–28 16 0001205000534921

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.

Morocco is not in the official SWIFT IBAN Registry. The format used here comes from unofficial lists, so check it with the bank or payment provider you work with.

What to test with MA IBANs

  • Accept exactly 28 characters for MA, after removing spaces, and reject 27 or 29.
  • Digits only after the check digits: a validator for MA should reject any letter there.
  • Same structure as Poland (PL). The country code is part of the MOD-97 calculation, so a valid MA IBAN with another country code in front must fail.
  • Ready-made invalid values for negative tests: MA64011519000001205000534922 (last character changed, MOD-97 fails) and MA6401151900000120500053492 (one character missing).
  • Bank directory checks: the bank code is random in both modes, so a directory lookup will usually fail.
  • Validators built on the SWIFT IBAN Registry, such as iban-check, reject MA IBANs because the country is not in it. Decide whether your system should accept them.

About IBANs in Morocco

Moroccan bank account numbers, the RIB, have 24 digits. The 28-character format used here puts all 24 after MA and the two check digits, so a Moroccan IBAN has only digits after the country code.

Questions about IBANs in Morocco

How long is an IBAN in Morocco?

28 characters: the country code MA, two check digits and a national part (BBAN) of 24 characters.

What does an IBAN from Morocco look like?

For example MA64 0115 1900 0001 2050 0053 4921. That is the print format, in groups of four. Forms and files usually take it without spaces: MA64011519000001205000534921.

Can Moroccan IBANs contain letters?

No. After the check digits, MA IBANs contain only digits: the BBAN pattern is 24n.

Where is the bank code in Moroccan IBANs?

The bank code, at positions 5–12: 01151900 in the registry example.

Will a test IBAN for Morocco pass validation?

It passes the checks most forms run: country code, length, character format and MOD-97 check digits. Checks that need bank data will usually reject it: the bank code is random, and an account lookup or a payee name check will not confirm the account.

Can I use a generated Moroccan 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.