DGI guide
Definition, how to obtain it, how to check the format, and the role of the IF in 2026 e-invoicing.
Last updated 15 June 2026
By Salah Eddine Boussettah - Founder & CEO, Marrakech
The identifiant fiscal (IF) is a number assigned by Morocco's tax authority (DGI) to any individual or company carrying out an activity in Morocco, at the time of the declaration of existence. It identifies the taxpayer to the tax administration and must appear on invoices and on VAT and income-tax (IS or IR) returns. The IF is distinct from the ICE (Identifiant Commun de l'Entreprise, 15 digits) and from the commercial register (RC): each has a specific role. From 2026, the IF remains a required field on DGI-compliant electronic invoices.
The number that identifies you to the tax administration
The identifiant fiscal (IF) is a number assigned by Morocco's tax authority (DGI) to each taxpayer - a company or a person carrying out an activity - at the time of the declaration of existence. It is the single reference for all of your tax obligations.
The IF is usually numeric (often 7-8 digits). You need it to file VAT, corporate-tax (IS) or income-tax (IR) returns, and it must appear on your invoices alongside the ICE.
Important: the IF is not the ICE. The ICE (Identifiant Commun de l'Entreprise) is a 15-digit number shared across all administrations, whereas the IF is specific to the tax administration. Both are required on a compliant invoice.
The declaration of existence with the DGI
Every new company or activity must file a declaration of existence with the DGI, in principle within 30 days of starting activity (per the General Tax Code).
The process can be done online on the tax portal (the DGI's SIMPL services) or through the company-creation platform, depending on your situation.
Articles of association, the manager's ID, proof of address and, where applicable, the commercial register number (RC) and the ICE.
The DGI assigns your identifiant fiscal. Keep it: it will appear on your returns and on every invoice.
Exact steps and deadlines may vary. Always refer to the DGI's official instructions.
Check the format of an IF or an ICE
Use the tool below to check that the format of an IF or ICE number is correct before using it on an invoice. To confirm that a number actually exists and matches a given company, contact the DGI or ask your counterpart for supporting documents.
This checker validates format only. It does not verify the number's existence in the DGI registry (no official online lookup is available).
The main identifiers of a Moroccan business
A Moroccan business handles several numbers. Here is what each one is for and where it appears.
| Identifier | Full name | Format | Issued by | Main role |
|---|---|---|---|---|
| IF | Identifiant Fiscal (Tax ID) | Numeric (often 7-8 digits) | DGI | Identifies you to the tax administration (VAT, IS/IR, invoices). |
| ICE | Identifiant Commun de l'Entreprise | 15 digits | Administrations (OMPIC/DGI) | Single identifier shared across administrations; mandatory on invoices. |
| RC | Commercial Register | Numeric | Commercial court | Proof of registration in the commercial register. |
| TP | Professional Tax (former Patente) | Numeric | Local tax administration | Identifier for the local professional tax. |
| CNSS | National Social Security Fund | Numeric | CNSS | Affiliation number for employees' social coverage. |
Why your IF matters for DGI compliance
From 2026, Morocco makes e-invoicing mandatory. A DGI-compliant invoice must precisely identify the issuer and the customer - the IF and the ICE are among the key required fields.
With Hisab, your identifiers (IF, ICE) are saved once and then carried automatically onto every invoice and into the UBL 2.1 export, reducing data-entry errors and easing compliance.
The essentials about the identifiant fiscal
The IF (tax ID) is specific to the tax administration and is used for your returns and taxes. The ICE (15 digits) is a common identifier shared across all administrations. Both must appear on a compliant invoice.
By filing a declaration of existence with the DGI, in principle within 30 days of starting activity, online via the SIMPL services or when creating the company.
You can check the format of an IF or ICE with the tool on this page. There is no official public lookup to find a company from its IF; to confirm a number, contact the DGI or ask for supporting documents.
Yes. The IF is among the expected fields on an invoice in Morocco, alongside the ICE, name and address. This remains the case with 2026 e-invoicing.
Yes. An auto-entrepreneur has a tax ID tied to their status and must show it on their invoices.
This guide reflects publicly available information as of the date above. For binding rules, always consult the official sources:
Hisab is an independent e-invoicing software provider and is not affiliated with, or endorsed by, the DGI. This information is not tax advice.
Save your identifiers once - Hisab carries them onto every invoice and into the UBL export for the DGI.