
An HS code is not found, it is built: every pair of digits answers a specific question.
A Moroccan HS code reads left to right, and each segment answers a different question. The first two digits give the chapter, the first four the heading, the first six the international subheading shared by every party to the HS Convention. The last four belong to Morocco alone: that is where the import duty rate, the statistical unit and, very often, the control measure are decided.
The useful question is therefore not "what is this product's code" but "which technical facts, which legal texts and which calculation authorise this line on the day of declaration". This guide follows that order.
What each pair of digits decides
Stopping at six digits is the most frequent and most expensive mistake. The international subheading contains no rate, no supplementary unit and no control reference: it cannot be used to cost a transaction, and it cannot be used to complete a declaration. A six-digit code copied from a foreign database or a supplier catalogue is a research lead, never a conclusion.
The WCO HS Nomenclature fixes the first six digits and their notes; the integrated tariff published by the administration, consultable through ADIL and the ADII integrated tariff, fixes the next four and the measures attached to them. The two sources are not interchangeable.
The decision route, in order
- 01
Describe the goods in tariff terms
Material composition, manufacturing process, principal function, form of presentation, degree of completion. A commercial designation does not belong in this description: "connected housing" classifies nothing, "radio-broadcast receiver in a plastic housing, mains powered" classifies.
- 02
Keep two candidates, not one
The heading retained and its closest competitor. A file that cites a single candidate has not been examined: it has been confirmed.
- 03
Apply the general rules in sequence
GIR 1 first (terms and notes), then 2, 3(a), 3(b), 3(c), then 6 to descend to subheading level. Record which rule settled it, and why the earlier ones did not.
- 04
Descend to the national line
The last four digits are chosen with the same terms and notes, applied at national level. Record the tariff edition consulted and its date.
- 05
Get it approved and dated
The code, the rejected alternative, the decisive rule, the approver, the effective date and the event that will trigger a review. Without those five fields the decision cannot be replayed.
The General Interpretative Rules are hierarchical: jumping from GIR 1 to GIR 3(b) because the product "is composite" is a common methodological error. GIR 3 only opens if two headings remain equally plausible after reading the terms and the section and chapter notes.
Commercial description against tariff description
| What the supplier provides | What the tariff asks for | |
|---|---|---|
| Product identity | Catalogue reference, range name, EAN code. | Dominant constituent material, function performed, form of presentation. |
| Level of detail | Enough for an order and an invoice. | Enough to separate two neighbouring headings. |
| Stability | Changes with every marketing refresh, without notice. | Changes only if the product changes physically. |
| Evidential value | None in a post-clearance audit. | Binding if dated and attached to a technical data sheet. |
The tariff does not recognise range names. Any search that starts from the commercial name has to be retranslated into attributes before it becomes credible.
Two lines to open and read from the bottom up
The records below do not classify the goods in your examples: they are reading exercises. Open each hierarchy, work back up to the parent terms, read the chapter notes, then identify precisely the product fact that separates the two neighbouring branches.
8517130000Open the tariff record 8471300000Open the tariff recordCosting the exposure of a reused code
A code is almost never wrong once: it is wrong across the whole population of declarations that reused it. The calculation below is deliberately hypothetical; replace each assumption with the rates and thresholds that actually apply to your product on your date.
| Input | Formula | Result |
|---|---|---|
| Declarations concerned | BADR extract over 24 months | 54 lines |
| Average customs value | Teaching assumption | MAD 100,000 |
| Duty rate gap | 17.5% − 5% | 12.5 points |
| Gross duty exposure | 54 × 100,000 × 12.5% | MAD 675,000 |
The control list before transmission
What must be true before the code goes onto a declaration
| Control point | Status | What you must be able to show |
|---|---|---|
| Dated technical data sheet on file | Required | Composition, function, presentation — not the marketing sheet. |
| Two candidates compared in writing | Required | Heading retained and closest alternative, with the reason for rejection. |
| Decisive rule identified | Required | GIR cited by name, not "by analogy". |
| Tariff edition recorded | Required | Date ADIL was consulted and the integrated tariff version. |
| Code reused from an earlier declaration without review | Blocking | The tariff edition may have changed since. |
| Supplementary unit not populated | Blocking | The national line requires it and the message will be rejected or wrong. |
| Approver and effective date recorded | To do | Before closing, not after the first audit. |
After 2026: what triggers a review
An approved code is not permanent. It is valid for one product, one presentation and one tariff edition. Reopen the decision if composition or process changes, if the supplier or origin changes, if the commercial presentation changes (bulk, set, kit), if a new HS edition enters into force, or if a contrary classification decision is published.
Edition changes are tracked with the WCO correlation tables; the national regulatory framework and its application dates are published on the Official Gazette portal. After release, reconcile the accepted declaration against the approval: any difference in code, quantity, origin or procedure joins a correction queue, and often reveals that a mapping or a broker template is re-injecting the old answer.
Related articles

Morocco Customs Tariff 2026: how sections and chapters work
Sections, chapters, headings, national lines: how the Moroccan tariff tree is read, and why the notes are read before the wording.

Classify a product catalogue with HS codes that stay maintainable
Classifying 4,000 references is not classifying 4,000 times. How to build families on stable attributes and handle the exceptions first.

How to choose a customs broker and freight forwarder in Morocco
Comparing fees says nothing about the quality of a declarant. The mandate, the hard-file test, and the evidence they owe you back.

Calculating Moroccan customs duties by product
Import duty, the parafiscal levy and VAT do not share a base. The full cascade, the order of operations, and the documents that make the figure reproducible.