Skip to content

Global Trade

What Is an HS Code and How Does It Work?

What an HS code is, what the digits mean, why shipping documents need one, and how classification works—plus a link to look a code up.

June 1, 2025Last updated October 27, 2026By Davos Pham6 min readView as Markdown

Share
Librarian mascot at a drawer cabinet

An HS code is a six-digit number from the Harmonized System that identifies a traded product the same way across countries that use the system. Customs uses it for duties, taxes, import rules and trade statistics, so the code on your documents affects what you pay and whether goods clear.

Looking up a code? Use our HS code lookup.

The system is maintained by the World Customs Organization (WCO). Countries add their own digits after the first six for national duty rates and statistics. The rest of this guide explains the structure, what the code is for, and how AI can suggest candidates—not replace a ruling.

What is the HS code full form?

HS stands for Harmonized System. The full name is the Harmonized Commodity Description and Coding System. People often write it as "HS code", "hscode" or "harmonized code"; they all mean the same 6-digit international code.

What is an HS code used for?

Customs and trade bodies use the HS code to:

  • Set duty rates. Each national tariff lists its rates by code.
  • Apply import and export rules. Licenses, permits, product standards and restrictions are often attached to specific codes.
  • Determine origin. Many rules of origin in trade agreements are written as changes in HS heading or subheading.
  • Collect trade statistics. Governments report imports and exports by HS code.

How is an HS code structured?

The international HS code ends at six digits. Each pair narrows the product:

Digits

Level

Example: roasted coffee, not decaffeinated

First 2

Chapter

09: coffee, tea, maté and spices

First 4

Heading

0901: coffee

First 6

Subheading

0901.21: roasted coffee, not decaffeinated

8 to 10 (national)

Tariff line and statistical suffix

0901.21.00 in the US HTSUS, plus a 2-digit statistical suffix

Another example from the current US tariff: green tea in immediate packings of 3 kg or less is subheading 0902.10. Green tea in larger packings falls under 0902.20.

The US base ("general") rate for 0901.21.00 is listed as Free in the current HTSUS. Additional duties (e.g. HTS Chapter 99) may apply; check the current HTS or a customs broker.

The national digits differ by country. The US uses the 10-digit HTSUS for imports and the 10-digit Schedule B for exports; the EU uses the 8-digit Combined Nomenclature (CN) and TARIC. See HTS vs HS code for how they line up.

Is the HS code universal?

The first six digits are universal among countries that use the Harmonized System. Anything after six digits is national, so the full code for the same product is usually different in each importing country. Always confirm the national digits in the destination tariff before you file.

The system is also revised. HS 2022 is in force now. The WCO has adopted HS 2028, the eighth edition, which enters into force on January 1, 2028 and has 1,229 headings and 5,852 subheadings. Codes can move between editions, so a code that was correct a few years ago may not be correct today. When a new edition takes effect, re-check every code in your product master against the updated national tariff.

Why is an HS code required?

Customs declarations, commercial invoices and many certificates ask for the HS code because it is the common language customs systems run on. A wrong code can lead to:

  • Wrong duty. You pay too much, or too little and owe the difference later.
  • Clearance delays. Customs may hold goods to query the classification.
  • Penalties. In the US, the importer of record is responsible for declaring the correct classification, and errors can carry penalties.
  • Missed preferences. A wrong code can make goods appear not to meet a trade agreement's origin rule.

For the details, see what happens if you use the wrong HS code.

How do you find the right HS code?

1. Describe the product factually

List material, function, form (fresh, dried, roasted, assembled) and packaging. Classification follows what the product is, not its brand name.

Or search by product on the HS code lookup.

2. Find the chapter and read its notes

Section and chapter notes include or exclude goods and override heading titles.

3. Apply the General Rules of Interpretation

GRI 1 decides most products from the heading text and notes. GRI 3 handles ties: most specific heading, then essential character, then the last heading in numerical order.

4. Confirm the national digits

Open the destination tariff (for US imports, the HTSUS from the US International Trade Commission) and pick the full tariff line.

5. Check rulings and keep a record

Look for published rulings on similar goods and write down why you chose the code.

The full walk-through is in how to classify goods using HS codes.

How does AI classify HS codes?

AI classification tools read a product description (and sometimes an image or spec sheet), compare it with tariff text, explanatory material and past classification decisions, and return ranked candidate codes. A typical process:

1. Parse the description

The model extracts the facts that matter for classification: material, function, form and use.

2. Retrieve candidate headings

It searches tariff text and similar past decisions for headings that match those facts.

3. Rank and explain

It ranks subheadings and, in better tools, shows which heading text or note supports each candidate.

4. Hand off for review

A person checks the notes, the GRI reasoning and the national digits before the code is used on a filing.

How accurate is AI for HS code classification?

It depends on the description. AI does well when the input states material, function and form clearly, and on common products with many precedents. It is weaker on vague descriptions, multi-function goods, new technology and borderline cases where a chapter note or a ruling decides the outcome. Accuracy figures published by vendors are measured on their own test sets, so they don't transfer directly to your catalog.

A practical rule: use AI to get to two or three candidates fast, then confirm with the tariff text and, for high-value or unclear goods, a licensed customs broker or a binding ruling. Our HS code lookup tool guide shows that review step.

FAQ

What is an HS code?

A 6-digit code from the WCO's Harmonized System that classifies a traded product for customs duty, import rules and statistics.

What does HS code stand for?

Harmonized System code. The full name is the Harmonized Commodity Description and Coding System.

Is the HS code the same in every country?

The first six digits are. National digits after the sixth differ by country, so check the destination tariff.

Why is an HS code required on shipping documents?

Customs uses it to apply the right duty, taxes and import rules and to record trade statistics. Without a correct code, clearance can be delayed or the duty can be wrong.

How accurate is AI for HS code classification?

Good enough to produce candidates quickly when the description is clear. Final codes should still be checked against the tariff text and notes by a person.

How many digits does an HS code have?

Six internationally. National versions extend it, for example to 10 digits in the US HTSUS and Schedule B, and 8 digits in the EU CN.

Classify a product with the Compliance agent. Get candidate HS codes from a plain-language description, with the reasoning to check. Free to start. Meet the Compliance agent

Share

About EximAgent Research

EximAgent Research writes practical guides on finding buyers, reading trade data and checking HS codes, tariffs and sanctions.

Follow EximAgent for trade insights

Sign up for our newsletter

Enter your email to receive the latest trade insights, guides, and HS-code explainers from EximAgent Blog.