Morocco RIB and IBAN check
Paste your RIB (24 digits) or your Moroccan IBAN: the format and check digit are verified instantly, and you can generate the IBAN from the RIB.
Bank code (3 digits) + city/branch code (3) + account number (16) + check digit (2), no spaces or letters.
Starts with MA64, followed by the 24 digits of the RIB.
The IBAN is checked against the international ISO 13616 standard (mod-97 check digit): an official, universal calculation. The Moroccan RIB's 2-digit check key, however, isn't published in any official GPBM or Bank Al-Maghrib document: this test applies the formula commonly used by third-party verification tools, for guidance only. If in doubt, your bank remains the only reliable source.
The calculation runs in your browser: nothing you enter is sent or stored.
Format of a Moroccan RIB and IBAN
A Moroccan RIB has 24 digits: 3 for the bank, 3 for the city or branch, 16 for the account number, and 2 for the check digit. The Moroccan IBAN takes these same 24 digits, preceded by the MA country code and 2 check digits computed under the ISO 13616 standard: 28 characters in total (MA + 2 digits + the 24 digits of the RIB).
RIB or IBAN: which one to use?
The RIB identifies an account for domestic transfers and direct debits inside Morocco. The IBAN (International Bank Account Number) is the international version of the same account: it's needed to receive a transfer from abroad or invoice an international client. Both refer to the same account: the Moroccan IBAN is fully derived from the RIB.
Why two different levels of confidence
The IBAN's check digit follows a public international standard (ISO 13616, mod-97 algorithm): an IBAN this tool marks as valid genuinely meets that standard. The Moroccan RIB's check digit, on the other hand, isn't published in any accessible official document (GPBM, Bank Al-Maghrib): this test applies the formula several independent tools commonly use, as a consistency check only — not an official bank confirmation. If in doubt about a RIB, ask the bank concerned for an up-to-date bank account statement.
Sources
Calculation aid: the result is an estimate that depends on your situation; it does not replace advice from an accountant or the tax administration.
Your clients' bank details, saved once
Save your clients' and suppliers' RIB or IBAN in BILLX: they appear automatically on your invoices and payments, with no re-entering.
Other calculators
- Morocco VAT calculatorExcl. ↔ incl. VAT, multiple lines, totals by rate (20%, 10%, exempt, out of scope).
- Auto-entrepreneur simulatorTax on turnover collected, ceiling, 80,000 MAD per-client rule.
- Margin and selling priceSelling price excl. and incl. VAT, markup rate, margin rate and coefficient.
- Freelance daily rateDaily rate based on target income, expenses, billed days and tax scheme.
- VAT collected and deductibleVAT to pay or credit to carry forward for your monthly or quarterly return.
- Quote profitabilityQuote margin after discount and costs, break-even point, suggested price.
- Import Excel invoicesCheck and convert your Excel or CSV invoices: columns, lines, VAT and totals verified, error report, BILLX template.