Skip to main content

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:

PositionFieldLengthRule & MeaningExample
1 to 9Enterprise Identifier9 digitsUnique enterprise entity ID registered with OMPIC/DGI001522585
10 to 13Branch Identifier4 digits"0000" for headquarters or "0001+" for secondary branches0000
14 to 15Check Digits2 digitsIntegrity check key calculated using Modulo 9766

Official Algorithm (Modulo 97)

Official verification formula by the Moroccan tax authority (DGI):

Remainder = (BigInt(base13) * 100) mod 97; Key = 97 - Remainder.
  1. 1. Take the first 13 digits (9 enterprise + 4 branch digits).
  2. 2. Multiply the 13-digit integer by 100.
  3. 3. Compute the remainder modulo 97.
  4. 4. Subtract remainder from 97 (zero-padded to 2 digits).
  5. 5. The result must match the 14th and 15th digits of the ICE.

Frequently Asked Questions (FAQ)