The HS codes have to be written according to the country of origin. The World Customs Organization recommends a minimum six-digit code; for the ease of classification, several countries go beyond ten digits to make things easier. China had a 10-digit HS number until 2021 and then moved to a 13-digit format in 2022.
The initial six-digit part of the code is the same across the globe; these six-digit HS numbers can be broken down into chapters, headings, and subheadings.
For example, The code is for a Coffee powder exporting from India- 09011111
First two numbers- 09- Chapter- Coffee, tea, and spices
First four numbers- 0901- Heading- Coffee, coffee husks and skins, coffee substitutes
First six numbers- 090111-Sub heading- Coffee, not roasted, not decaffeinated
All numbers- 09011111- Extra level of identification- Coffee, Arabica, Grade A