Morocco Bank Code Finder
Find a Moroccan bank's RIB code, SWIFT/BIC and head office, look up a city code, or paste a RIB or IBAN to read it.
A Moroccan account number, the RIB, has 24 digits: a 3-digit bank code, a 3-digit city code, a 16-digit account number and a 2-digit key. The IBAN is MA, two check digits and the RIB, 28 characters in all. We found no official list of the bank codes, so each code in the finder is marked with where it comes from. Type a bank name, and it shows the bank code, SWIFT/BIC and head office. Type a city, and it shows the city code from Bank Al-Maghrib's list of 226 localities. Paste a RIB or an IBAN, and it reads the parts and tests the key.
Find a Bank, a City or Check a RIB
Type part of a bank or city name, a 3-digit code, a BIC, a full RIB or an IBAN starting MA. The search runs in your browser and nothing you type is sent. Do not paste an account number that you would not share.
Moroccan Bank Codes
The banks in the finder, and where each RIB bank code comes from. Tap a name in the search above for the details.
| Bank | Code | SWIFT/BIC | Source of the code |
|---|---|---|---|
| Attijariwafa bank | 007 | BCMAMAMC | Printed on the bank's RIBs |
| Bank of Africa | 011 | BMCEMAMC | Printed on the bank's RIBs |
| BMCI | 013 | BMCIMAMC | Government code table |
| Crédit du Maroc | 021 | CDMAMAMC | Government code table |
| Saham Bank | 022 | SGMBMAMC | Government code table |
| Citibank Maghreb | 028 | CITIMAMC | Government code table |
| Banque Centrale Populaire | 190 | BCPOMAMC | Government code table |
| Crédit Agricole du Maroc | 225 | CNCAMAMR | Stated by the bank |
| CIH Bank | 230 | CIHMMAMC | Government code table |
| Al Barid Bank | 350 | ABBMMAMC | Government code table |
| CFG Bank | Not confirmed | CAFGMAMC | No code found |
| Arab Bank | Not confirmed | ARABMAMC | No code found |
Go Deeper
What a Morocco Bank Code Is
In Morocco the bank is named by the first 3 digits of the RIB (relevé d'identité bancaire), the account identity statement that a bank gives you. The next 3 digits are a city code, then come 16 digits of account number and a 2-digit key. Bank documents show the same RIB with "MA" and 2 check digits in front of it as the IBAN.
The RIB in the picture is made up to show the layout. It is not an account. Its IBAN is MA64 0077 8000 0000 0000 0000 0160.
The RIB Key and Why an IBAN Starts MA64
The key is calculated from the other 22 digits, so a typing mistake shows up. Write the 22 digits followed by 00, divide by 97, and subtract the remainder from 97. The result is the key. We tested this on every RIB issued by a bank that we found in public documents, and it matches each time. A RIB with a correct key is a multiple of 97, and for that reason the IBAN check digits that go with it are always 64. That is why the IBANs in bank documents all start MA64. A pass means the RIB is correctly formed. It does not mean that the account exists or whose it is.
Where the Bank Codes Come From
Bank Al-Maghrib publishes a list of city codes, but we found no list of bank codes from it, from the banks' association, or from the clearing system. So the finder says how sure it is of each code:
- Printed on RIBs issued by the bank. Attijariwafa bank (007) and Bank of Africa (011). We read the code on several bank-issued RIBs in public documents, and each RIB passes the key test.
- Stated by the bank. Crédit Agricole du Maroc (225), on its page for Moroccans abroad.
- From a government code table. A table of codes used by a Moroccan government information system, copied on a public site in 2018. It gives the code and an abbreviation, such as BMCI or CIH. We found no bank document that shows these codes, so check the first 3 digits of your own RIB.
The table has many other codes, some of banks that no longer exist, and codes from 101 to 197 with abbreviations that begin with BP, which appear to be the regional Banques Populaires. Because it gives only abbreviations, we do not name those, apart from Banque Centrale Populaire (190). The banks that started in recent years, such as the participatory banks, are not in it either.
The City Code and the Branch
Digits 4 to 6 are a city code. Bank Al-Maghrib's list gives a code to each of 226 localities, with the number of bank branches in each at 28 February 2026. Some banks call this number "guichet", the counter. The RIB has no separate branch code. The branch is named in the "domiciliation" line of the RIB. A bank sometimes gives a branch the code of a neighbouring locality, so the city code may not be the town on the branch's address. The list also names smaller localities without a code, and we do not include those.
Domestic Transfers
Bank Al-Maghrib says a transfer moves money between two accounts of one person or of two people, at the same bank or at two different banks. To pay someone in Morocco you need the beneficiary's RIB, as banks ask for it when you add a beneficiary in their apps. Payments between banks go through the Moroccan interbank clearing system (SIMT), which Bank Al-Maghrib set up in 2003. It works by multilateral net clearing, and settles once a day in central bank money.
Sending Money to Morocco From Abroad
A payment from another country needs the recipient's RIB or IBAN, and the bank's SWIFT/BIC. BMCI tells customers abroad to give the account number that is on the RIB and the bank's SWIFT code, BMCIMAMC. Crédit Agricole du Maroc lists the RIB number, its SWIFT code CNCAMAMR and its bank code 225. Check the format of a BIC on our SWIFT code checker and of an IBAN on our IBAN validator.
Tips
- Get the RIB from the bank's app, its website or the branch, and paste it here to test the key.
- Some banks have new names. The government table calls code 022 SGMB, and its BIC, SGMBMAMC, now belongs to Saham Bank in the LEI record. Code 011 is listed as BMCE, and its bank is Bank of Africa.
- Code 350 is listed as CCP, the postal cheque accounts. Al Barid Bank, the postal bank, holds them.
- The same 3 digits can be a bank code and a city code. 011, for example, is Bank of Africa and also the city code of Biougra. The first 3 digits of a RIB are always the bank.
What This Page Uses
City codes and branch counts come from Bank Al-Maghrib's list of branches, deposits and credits by locality at 28 February 2026. The facts about transfers come from Bank Al-Maghrib's pages on transfers and on the interbank clearing system. Crédit Agricole du Maroc's code is from its guide for Moroccans abroad. The other codes are from RIBs issued by the banks, and from the government table described above. BICs and head office addresses come from the Swift and GLEIF mapping, and every bank in the finder has a record in GLEIF, whose LEI data is open under the CC0 licence. We last checked on 20 September 2026.
Frequently Asked Questions
What is a Morocco bank code?
In Morocco it is the first 3 digits of the RIB, the account identity statement (relevé d'identité bancaire) that a bank gives you. The RIB has 24 digits: a 3-digit bank code, a 3-digit city code, a 16-digit account number and a 2-digit key. The IBAN is MA, two check digits and the RIB.
What are the bank codes of Attijariwafa bank, Bank of Africa and CIH?
Attijariwafa bank is 007 and Bank of Africa is 011, as printed on RIBs that the banks issued. CIH Bank is 230 in a government code table, but we found no bank document that shows it, so check the first 3 digits of your own RIB. Crédit Agricole du Maroc states its own code, 225.
Is there an official list of Moroccan bank codes?
We did not find one. Bank Al-Maghrib publishes the city codes, and we found no list of bank codes from it, from the banks' association or from the clearing system. The finder shows where each code comes from: a bank-issued RIB, the bank's own website, or a government code table.
What is the city code in a RIB?
Digits 4 to 6. Bank Al-Maghrib gives a code to each locality where banks have branches, and its list at 28 February 2026 has 226 of them, for example 780 for Casablanca, 810 for Rabat and 450 for Marrakech. A bank sometimes gives a branch the code of a neighbouring locality.
Is there a branch code?
Not as a separate number. The RIB has a city code and the account number, and the branch is named in the "domiciliation" line of the RIB. Some banks call the city code "guichet", the counter.
Why does every Moroccan IBAN start with MA64?
The RIB key is calculated so that the whole 24-digit RIB is a multiple of 97. With such a RIB, the IBAN check digits always come out as 64. An IBAN that starts with another number is not made from a RIB with a correct key.
How is the RIB key calculated?
Write the first 22 digits, the bank code, the city code and the account number, followed by 00. Divide by 97 and subtract the remainder from 97. The result is the key. The checker does this, and shows the expected key if yours does not match.
Is the bank code the same as the SWIFT/BIC?
No. The bank code has 3 digits and is the start of the RIB. A SWIFT/BIC code has 8 or 11 characters and is for payments from abroad. For example the BIC of Attijariwafa bank is BCMAMAMC, of Bank of Africa BMCEMAMC and of CIH Bank CIHMMAMC. Check the format of a BIC on our SWIFT code checker.
What do I need to receive money from abroad in Morocco?
Your IBAN or RIB, your name as it is on the account, and your bank's SWIFT/BIC. BMCI tells customers abroad to give the account number that is on the RIB and the bank's SWIFT code, BMCIMAMC. Crédit Agricole du Maroc lists the RIB number, its SWIFT code CNCAMAMR and its bank code 225.
How does a bank transfer work inside Morocco?
Bank Al-Maghrib says a transfer moves money between two accounts of one person or of two people, at the same bank or at two different banks. You need the beneficiary's RIB. Payments between banks go through the Moroccan interbank clearing system (SIMT), which Bank Al-Maghrib set up in 2003, and which settles once a day.
Why is my bank not in the finder?
The finder names 12 banks, those for which we found a bank code or a BIC that we could check. Regional Banques Populaires, banks that began in recent years and the participatory banks are not named. Read the bank code from the first 3 digits of your RIB, and paste the RIB in the checker to test it.
How current is this page?
The city codes and branch counts are Bank Al-Maghrib's at 28 February 2026. The government code table that some bank codes come from was copied on a public site in 2018. Banks merge and rename, so confirm the details with the bank. We last checked on 20 September 2026.
Is anything I type stored or sent?
No. The search and the RIB test run in your browser on data that is inside the page. Nothing you type is stored or sent.
