Morocco ICE Generator
Generator for Moroccan Identifiant Commun de l'Entreprise (ICE) with Modulo 97 check key.
Waiting for generation...
About the Identifiant Commun de l'Entreprise (ICE)
The ICE is the unified national company identifier in Morocco, linking corporate tax (IF), commercial register (RC), and social security (CNSS).
Enacted under Law No. 88-12, it is mandatory on all B2B invoices and commercial transactions in Morocco.
Moroccan ICE Anatomy & Structure
The Moroccan ICE consists of exactly 15 numeric digits structured into three blocks:
| Position | Field | Length | Rule & Meaning | Example |
|---|---|---|---|---|
| 1 to 9 | Enterprise Identifier | 9 digits | Unique enterprise entity ID registered with OMPIC/DGI | 001522585 |
| 10 to 13 | Branch Identifier | 4 digits | "0000" for headquarters or "0001+" for secondary branches | 0000 |
| 14 to 15 | Check Digits | 2 digits | Integrity check key calculated using Modulo 97 | 66 |
Official Algorithm (Modulo 97)
Official verification formula by the Moroccan tax authority (DGI):
Remainder = (BigInt(base13) * 100) mod 97; Key = 97 - Remainder.
- 1. Take the first 13 digits (9 enterprise + 4 branch digits).
- 2. Multiply the 13-digit integer by 100.
- 3. Compute the remainder modulo 97.
- 4. Subtract remainder from 97 (zero-padded to 2 digits).
- 5. The result must match the 14th and 15th digits of the ICE.