Morocco IBAN validator
How the IBAN format works
- Format
- MA + 2 check digits + 26 digits (28 chars) — used in practice, not in the official SWIFT IBAN registry
- Example
- MA58000000000000000000100018
Things to watch for
- Morocco is not in the official SWIFT IBAN registry — this 28-character format used domestically by Moroccan banks (RIB-based) isn't formally standardized by SWIFT/ECBS
- At 28 characters, all-numeric after the check digits, a Moroccan IBAN is 2 characters longer than neighboring Algeria's 26-character format despite the same all-digit structure
- Checks format and checksum only — does not confirm the account exists or is held at a real Moroccan bank
^MA[0-9]{26}$A Moroccan IBAN-style account number is 28 characters: “MA”, two check digits, then 26 digits with no letters anywhere — for example MA58000000000000000000100018. Morocco is not in the official SWIFT/ECBS IBAN registry; the 28-character format is instead built by wrapping the country’s existing domestic bank identifier, the RIB (Relevé d’Identité Bancaire), inside an IBAN-shaped mod-97 checksum, a pattern Moroccan banks converged on for handling international transfers without SWIFT ever formally cataloguing the result.
At 28 characters, Morocco’s format runs longer than neighboring Algeria’s 26-character one, even though both are purely numeric after the two check digits — the gap comes down to Morocco’s RIB-derived digit block running 26 digits against Algeria’s 24, not any shared regional standard between the two Maghreb countries.
How this validator works
This tool checks the “MA” prefix, confirms exactly 26 digits follow the two check digits, and runs the mod-97 checksum (ISO 7064) a correctly formed Moroccan account number satisfies. Everything runs client-side, with nothing sent to a server.
What a pass doesn’t tell you
A pass confirms the 28 characters are internally consistent — not that the account is open or that Morocco has formal SWIFT IBAN registration. This tool performs no lookup against Bank Al-Maghrib or any Moroccan bank.
Scope: format and mod-97 checksum validation only, for a RIB-derived format that isn’t SWIFT-registered — not payment processing or account confirmation.
Content last reviewed 2026-08-10.
IBAN FAQ
Is Morocco an official SWIFT IBAN registry country?
No. Morocco is not in the official SWIFT/ECBS IBAN registry. Moroccan banks use a 28-character, all-numeric IBAN-shaped account number, built on the domestic RIB (Relevé d'Identité Bancaire) structure, that satisfies the mod-97 checksum without formal SWIFT backing.
What does a Moroccan IBAN-style number look like?
28 characters: 'MA', two check digits, then 26 digits with no letters — for example MA58000000000000000000100018.
Why is Morocco's format longer than Algeria's?
Both are entirely numeric after the check digits, but Morocco's digit block is 26 digits against Algeria's 24 — a 2-character difference that comes from how each country's domestic account-numbering system (RIB in Morocco) maps onto the IBAN-style wrapper, not from any shared rule between the two.