ISO 6346 is an international standard covering the coding, identification and marking of intermodal (shipping) containers used within containerized intermodal freight transport. The standard establishes a visual identification system for every container that includes a unique serial number (with check digit), the owner, a country code, a size, type and equipment category as well as any operational marks. The standard is managed by the International Container Bureau (BIC).
Video ISO 6346
Identification System
Example of an ISO 6346 compliant container number:
The illustrated example is a code for a container owned by Hapag-Lloyd AG.
Owner Code
The owner code consists of three capital letters of the Latin alphabet to indicate the owner or principal operator of the container. Such code needs to be registered at the Bureau International des Conteneurs in Paris to ensure uniqueness worldwide. An owner can apply for more than one code, as normally the first 2 letters are used as the owner code and the third is used to indicate pool (e.g. HLA, HLB, HLX are some Hapag-Lloyd codes to indicate whether container is standard, reefer...)
Equipment Category Identifier
The equipment category identifier consists of one of the following capital letters of the Latin alphabet:
- U for all freight containers
- J for detachable freight container-related equipment
- Z for trailers and chassis
Presently, all official BIC container codes end in "U". However, the Association of American Railroads recognizes similar codes for their containers and trailers traveling by rail in North America, however these are not recognized by the BIC and lack check digits.
Under the ISO code, then, only U, J, and Z are in use. The reefer container is identified by means of the size type code.
Serial Number
The serial number consists of 6 numeric digits, assigned by the owner or operator, uniquely identifying the container within that owner/operator's fleet.
Check Digit
The check digit consists of one numeric digit providing a means of validating the recording and transmission accuracies of the owner code and serial number.
To compute the check digit, the letters have to be converted to numbers. This is done in three steps:
Calculation Step 1
An equivalent numerical value is assigned to each letter of the alphabet, beginning with 10 for the letter A (11 and multiples thereof are omitted):
The individual digits of the serial number keep their numeric value.
Calculation Step 2
Each of the numbers calculated in step 1 is multiplied by 2position, where position is the exponent to base 2. Position starts at 0, from left to right.
The following table shows the multiplication factors:
Calculation Step 3
If the final difference is 10, then the check digit becomes 0. To ensure that this does not happen, the standard recommends that serial numbers should not be used which produce a final difference of 10; however, there are containers in the market which do not follow this recommendation, so handling this case has to be included if a check digit calculator is programmed.
Notice that step (ii) to (v) is a calculation of the remainder found after division of (i) by 11. Most programming languages have a modulo operator for this. Attention should be paid on how it is working in the language chosen; i. e. if it is giving back the decimal rest or the integer rest in order to get proper results. 11 is used as divisor because a container number has 11 letters and digits in total. In step 1 the numbers 11, 22 and 33 are left out as they are multiples of the divisor.
Example
Code Samples
The following are the algorithm in various programming languages:
Code Sample (C#)
Code Sample (Matlab)
Below is a code Snippet implementing the above algorithm in MATLAB validating string "cid":
Code Sample (DELPH? or pascal)
Code Sample (Visual Basic)
Below is the Visual Basic (VBA) code to create a custom "ISO6346Check" function in Microsoft Excel (Alt + F11) that returns the correct check digit:
Code Sample (Python)
Below is Python (2.7) code to validate the string "cid":
Code Sample (Javascript)
Below is the Javascript code to create a custom "ISO6346Check":
Code Sample (Excel)
Below is an Excel Formula to validate container number in Cell A1
==IF(LEN(A1)==11,IF((MID(A1,11,1)*1)=(1*SUBSTITUTE((IF(MID(A1,1,1)="A",10,IF(MID(A1,1,1)="B",12,IF(MID(A1,1,1)="C",13,IF(MID(A1,1,1)="D",14, IF(MID(A1,1,1)="E",15,IF(MID(A1,1,1)="F",16,IF(MID(A1,1,1)="G",17,IF(MID(A1,1,1)="H",18,IF(MID(A1,1,1)="I",19, IF(MID(A1,1,1)="J",20,IF(MID(A1,1,1)="K",21,IF(MID(A1,1,1)="L",23,IF(MID(A1,1,1)="M",24,IF(MID(A1,1,1)="N",25, IF(MID(A1,1,1)="O",26,IF(MID(A1,1,1)="P",27,IF(MID(A1,1,1)="Q",28,IF(MID(A1,1,1)="R",29,IF(MID(A1,1,1)="S",30, IF(MID(A1,1,1)="T",31,IF(MID(A1,1,1)="U",32,IF(MID(A1,1,1)="V",34,IF(MID(A1,1,1)="W",35,IF(MID(A1,1,1)="X",36, IF(MID(A1,1,1)="Y",37,IF(MID(A1,1,1)="Z",38,FALSE)))))))))))))))))))))))))))+ (IF(MID(A1,2,1)="A",10,IF(MID(A1,2,1)="B",12,IF(MID(A1,2,1)="C",13,IF(MID(A1,2,1)="D",14,IF(MID(A1,2,1)="E",15, IF(MID(A1,2,1)="F",16,IF(MID(A1,2,1)="G",17,IF(MID(A1,2,1)="H",18,IF(MID(A1,2,1)="I",19,IF(MID(A1,2,1)="J",20, IF(MID(A1,2,1)="K",21,IF(MID(A1,2,1)="L",23,IF(MID(A1,2,1)="M",24,IF(MID(A1,2,1)="N",25,IF(MID(A1,2,1)="O",26, IF(MID(A1,2,1)="P",27,IF(MID(A1,2,1)="Q",28,IF(MID(A1,2,1)="R",29,IF(MID(A1,2,1)="S",30,IF(MID(A1,2,1)="T",31, IF(MID(A1,2,1)="U",32,IF(MID(A1,2,1)="V",34,IF(MID(A1,2,1)="W",35,IF(MID(A1,2,1)="X",36,IF(MID(A1,2,1)="Y",37, IF(MID(A1,2,1)="Z",38,FALSE))))))))))))))))))))))))))*2)+(IF(MID(A1,3,1)="A",10,IF(MID(A1,3,1)="B",12,IF(MID(A1,3,1)="C",13,IF(MID(A1,3,1)="D",14,IF(MID(A1,3,1)="E",15, IF(MID(A1,3,1)="F",16,IF(MID(A1,3,1)="G",17,IF(MID(A1,3,1)="H",18,IF(MID(A1,3,1)="I",19,IF(MID(A1,3,1)="J",20, IF(MID(A1,3,1)="K",21,IF(MID(A1,3,1)="L",23,IF(MID(A1,3,1)="M",24,IF(MID(A1,3,1)="N",25,IF(MID(A1,3,1)="O",26, IF(MID(A1,3,1)="P",27,IF(MID(A1,3,1)="Q",28,IF(MID(A1,3,1)="R",29,IF(MID(A1,3,1)="S",30,IF(MID(A1,3,1)="T",31, IF(MID(A1,3,1)="U",32,IF(MID(A1,3,1)="V",34,IF(MID(A1,3,1)="W",35,IF(MID(A1,3,1)="X",36,IF(MID(A1,3,1)="Y",37, IF(MID(A1,3,1)="Z",38,FALSE))))))))))))))))))))))))))*4)+(IF(MID(A1,4,1)="A",10,IF(MID(A1,4,1)="B",12,IF(MID(A1,4,1)="C",13,IF(MID(A1,4,1)="D",14,IF(MID(A1,4,1)="E",15, IF(MID(A1,4,1)="F",16,IF(MID(A1,4,1)="G",17,IF(MID(A1,4,1)="H",18,IF(MID(A1,4,1)="I",19,IF(MID(A1,4,1)="J",20, IF(MID(A1,4,1)="K",21,IF(MID(A1,4,1)="L",23,IF(MID(A1,4,1)="M",24,IF(MID(A1,4,1)="N",25,IF(MID(A1,4,1)="O",26, IF(MID(A1,4,1)="P",27,IF(MID(A1,4,1)="Q",28,IF(MID(A1,4,1)="R",29,IF(MID(A1,4,1)="S",30,IF(MID(A1,4,1)="T",31, IF(MID(A1,4,1)="U",32,IF(MID(A1,4,1)="V",34,IF(MID(A1,4,1)="W",35,IF(MID(A1,4,1)="X",36,IF(MID(A1,4,1)="Y",37, IF(MID(A1,4,1)="Z",38,FALSE))))))))))))))))))))))))))*8)+(MID(A1,5,1)*16)+(MID(A1,6,1)*32)+(MID(A1,7,1)*64)+(MID(A1,8,1)*128)+(MID(A1,9,1)*256)+(MID(A1,10,1)*512)-11*ROUNDDOWN((((IF(MID(A1,1,1)="A",10,IF(MID(A1,1,1)="B",12,IF(MID(A1,1,1)="C",13, IF(MID(A1,1,1)="D",14,IF(MID(A1,1,1)="E",15,IF(MID(A1,1,1)="F",16,IF(MID(A1,1,1)="G",17,IF(MID(A1,1,1)="H",18, IF(MID(A1,1,1)="I",19,IF(MID(A1,1,1)="J",20,IF(MID(A1,1,1)="K",21,IF(MID(A1,1,1)="L",23,IF(MID(A1,1,1)="M",24, IF(MID(A1,1,1)="N",25,IF(MID(A1,1,1)="O",26,IF(MID(A1,1,1)="P",27,IF(MID(A1,1,1)="Q",28,IF(MID(A1,1,1)="R",29, IF(MID(A1,1,1)="S",30,IF(MID(A1,1,1)="T",31,IF(MID(A1,1,1)="U",32,IF(MID(A1,1,1)="V",34,IF(MID(A1,1,1)="W",35, IF(MID(A1,1,1)="X",36,IF(MID(A1,1,1)="Y",37,IF(MID(A1,1,1)="Z",38,FALSE)))))))))))))))))))))))))))+(IF(MID(A1,2,1)="A",10,IF(MID(A1,2,1)="B",12,IF(MID(A1,2,1)="C",13,IF(MID(A1,2,1)="D",14,IF(MID(A1,2,1)="E",15, IF(MID(A1,2,1)="F",16,IF(MID(A1,2,1)="G",17,IF(MID(A1,2,1)="H",18,IF(MID(A1,2,1)="I",19,IF(MID(A1,2,1)="J",20, IF(MID(A1,2,1)="K",21,IF(MID(A1,2,1)="L",23,IF(MID(A1,2,1)="M",24,IF(MID(A1,2,1)="N",25,IF(MID(A1,2,1)="O",26, IF(MID(A1,2,1)="P",27,IF(MID(A1,2,1)="Q",28,IF(MID(A1,2,1)="R",29,IF(MID(A1,2,1)="S",30,IF(MID(A1,2,1)="T",31, IF(MID(A1,2,1)="U",32,IF(MID(A1,2,1)="V",34,IF(MID(A1,2,1)="W",35,IF(MID(A1,2,1)="X",36,IF(MID(A1,2,1)="Y",37, IF(MID(A1,2,1)="Z",38,FALSE))))))))))))))))))))))))))*2)+(IF(MID(A1,3,1)="A",10,IF(MID(A1,3,1)="B",12,IF(MID(A1,3,1)="C",13,IF(MID(A1,3,1)="D",14,IF(MID(A1,3,1)="E",15, IF(MID(A1,3,1)="F",16,IF(MID(A1,3,1)="G",17,IF(MID(A1,3,1)="H",18,IF(MID(A1,3,1)="I",19,IF(MID(A1,3,1)="J",20, IF(MID(A1,3,1)="K",21,IF(MID(A1,3,1)="L",23,IF(MID(A1,3,1)="M",24,IF(MID(A1,3,1)="N",25,IF(MID(A1,3,1)="O",26, IF(MID(A1,3,1)="P",27,IF(MID(A1,3,1)="Q",28,IF(MID(A1,3,1)="R",29,IF(MID(A1,3,1)="S",30,IF(MID(A1,3,1)="T",31, IF(MID(A1,3,1)="U",32,IF(MID(A1,3,1)="V",34,IF(MID(A1,3,1)="W",35,IF(MID(A1,3,1)="X",36,IF(MID(A1,3,1)="Y",37, IF(MID(A1,3,1)="Z",38,FALSE))))))))))))))))))))))))))*4)+(IF(MID(A1,4,1)="A",10,IF(MID(A1,4,1)="B",12,IF(MID(A1,4,1)="C",13,IF(MID(A1,4,1)="D",14,IF(MID(A1,4,1)="E",15, IF(MID(A1,4,1)="F",16,IF(MID(A1,4,1)="G",17,IF(MID(A1,4,1)="H",18,IF(MID(A1,4,1)="I",19,IF(MID(A1,4,1)="J",20, IF(MID(A1,4,1)="K",21,IF(MID(A1,4,1)="L",23,IF(MID(A1,4,1)="M",24,IF(MID(A1,4,1)="N",25,IF(MID(A1,4,1)="O",26, IF(MID(A1,4,1)="P",27,IF(MID(A1,4,1)="Q",28,IF(MID(A1,4,1)="R",29,IF(MID(A1,4,1)="S",30,IF(MID(A1,4,1)="T",31, IF(MID(A1,4,1)="U",32,IF(MID(A1,4,1)="V",34,IF(MID(A1,4,1)="W",35,IF(MID(A1,4,1)="X",36,IF(MID(A1,4,1)="Y",37, IF(MID(A1,4,1)="Z",38,FALSE))))))))))))))))))))))))))*8)+(MID(A1,5,1)*16)+(MID(A1,6,1)*32)+(MID(A1,7,1)*64)+(MID(A1,8,1)*128)+(MID(A1,9,1)*256)+(MID(A1,10,1)*512))/11),0),10,0)),"VALID","INVALID"),"INVALID")
Below is a shorter Excel formula for the same function (container number in cell A1) (Warning, this code does not correctly account for a check digit result of "10"):
==IF(LEN(A1)==11,IF((MID(A1,11,1)*1)=MOD(IF(PROPER(MID(A1,1,1))="A",10,IF(AND(CODE(MID(A1,1,1))>65,CODE(MID(A1,1,1))<=75),CODE(MID(A1,1,1))-54,IF(AND(CODE(MID(A1,1,1))>75,CODE(MID(A1,1,1))<=85),CODE(MID(A1,1,1))-53,IF(AND(CODE(MID(A1,1,1))>85,CODE(MID(A1,1,1))<=90),CODE(MID(A1,1,1))-52,MID(A1,1,1)))))*1+IF(PROPER(MID(A1,2,1))="A",10,IF(AND(CODE(MID(A1,2,1))>65,CODE(MID(A1,2,1))<=75),CODE(MID(A1,2,1))-54,IF(AND(CODE(MID(A1,2,1))>75,CODE(MID(A1,2,1))<=85),CODE(MID(A1,2,1))-53,IF(AND(CODE(MID(A1,2,1))>85,CODE(MID(A1,2,1))<=90),CODE(MID(A1,2,1))-52,MID(A1,2,1)))))*2+IF(PROPER(MID(A1,3,1))="A",10,IF(AND(CODE(MID(A1,3,1))>65,CODE(MID(A1,3,1))<=75),CODE(MID(A1,3,1))-54,IF(AND(CODE(MID(A1,3,1))>75,CODE(MID(A1,3,1))<=85),CODE(MID(A1,3,1))-53,IF(AND(CODE(MID(A1,3,1))>85,CODE(MID(A1,3,1))<=90),CODE(MID(A1,3,1))-52,MID(A1,3,1)))))*4+IF(PROPER(MID(A1,4,1))="A",10,IF(AND(CODE(MID(A1,4,1))>65,CODE(MID(A1,4,1))<=75),CODE(MID(A1,4,1))-54,IF(AND(CODE(MID(A1,4,1))>75,CODE(MID(A1,4,1))<=85),CODE(MID(A1,4,1))-53,IF(AND(CODE(MID(A1,4,1))>85,CODE(MID(A1,4,1))<=90),CODE(MID(A1,4,1))-52,MID(A1,4,1)))))*8+MID(A1,5,1)*16+MID(A1,6,1)*32+MID(A1,7,1)*64+MID(A1,8,1)*128+MID(A1,9,1)*256+MID(A1,10,1)*512,11),"VALID","INVALID"),"INVALID")
Below is an Excel array formula for the same function (container number in cell A1):
==IF(LEN(A1)==11,IF(MOD(MOD(SUMPRODUCT(CODE(PROPER(MID(A1,{1,2,3,4},1)))+INT(CODE(PROPER(MID(A1,{1,2,3,4},1)))/11)-60,{1,2,4,8})+ SUMPRODUCT(MID(A1,{5,6,7,8,9,10},1)+0,{16,32,64,128,256,512}),11),10)=RIGHT(A1)+0,"VALID","INVALID"),"INVALID")
Code Sample (PHP)
Below is the PHP code to validate a container number:
Code Sample (Java)
Below is the Java code to validate a container number:
Code Sample (Visual FoxPro)
Below is a VFP codesample, adopted from the above VB sample
Code Sample (Eiffel)
Below is an Eiffel code sample.
Code Sample (T-SQL)
Below is a Select statement implementing the above algorithm in T-SQL for Microsoft SQL Server, validating column ContainerNumber on all rows of the dbo.Containers table:
Code Sample (Go)
Below is a code Snippet implementing the above algorithm in Go validating string "cn":
Code Sample (R Language)
Below is a code Snippet implementing the Check Digit algorithm in R to validate the string "cntr_no":
Practical Problems
In day-to-day business it happens that containers do appear which do not follow the ISO 6346 identification at all; however, they are fully CSC safety approved containers. Usually these are "shippers owned" containers, which means that they are not owned by the carrier but supplied by the cargo owners (shippers). They may have no registered owner code and no category identifier and have no check digit. It is advisable to follow ISO 6346 as the absence of a compliant identification code causes problems for both carriers and container terminals to correctly identify the equipment and properly deliver the cargo, because computer systems require ISO 6346 conformant naming and as such missing prefixes are invented. For example, YYYY at the carrier and XXXX at the terminal causes the equipment to mismatch. Moreover, since ISO 6346 identification has become a requirement in international Customs conventions (Customs Conventions on Containers and Istanbul Convention), many Customs Administrations have begun validating that containers are marked as per the standard.
Maps ISO 6346
Size and Type Codes
The codes are compiled of the following elements:
- First character, representing the length (coded)
- Second character, representing the width and height (coded)
- Third and fourth character indicating the type of the container
The following is an overview of the most common codes:
Use the below to calculate Size/Type of a less commonly used ISO 6346 containers:
Country Code (Optional)
The country code consists of two capital letters of the Latin alphabet as described in ISO 3166. It indicates the country where the code is registered not the nationality of the owner or operator of the container. The letters of the code shall not be less than 100 mm high.
Mandatory Operational Marks
Operational marks are intended solely to convey information requested for the movement of containers or give visual warnings. They relate to
- the weight of containers
- a symbol to denote air-surface container
- a sign warning of overhead electrical danger
- height marks for containers higher than 2.6 m (8 ft 6 in)
See also
- Standard Carrier Alpha Code
- UIC wagon numbers
The following is a list of further freight container related ISO specifications, where not all have an article assigned yet (you can help improve Wikipedia and start one):
- ISO 668 - Freight containers - Classification, dimensions and ratings
- ISO 830 - Freight containers - Terminology
- ISO 1161 - Freight containers - Corner fittings - Specification
- ISO 1496 - Freight containers - Specification and testing
- ISO 2308 - Hooks for lifting freight containers of up to 30 tons capacity - Basic requirements
- ISO 3874 - Freight containers - Handling and securing
- ISO 8323 - Freight containers - Air/surface (intermodal) general purpose containers - Specification and tests
- ISO 9669 - Freight containers - Interface connections for tank containers
- ISO 9711 - Freight containers - Information related to containers on board vessels
- ISO 9897 - Container equipment data exchange (CEDEX)
- ISO 10368 - Freight thermal containers - Remote condition monitoring
- ISO 10374 - Freight containers - Automatic identification
References
- Notes
- Sources
- Bureau International des Containers: Containers BIC-Code (printed brochure)
- Container Numbering Guide
External links
- Bureau International des Containers (BIC)
- Intermodal Check Digit Calculator
- BIC Code Identifier
- Freight Container Check Digit Calculator (includes Java source code for download *Static Java Method does not convert "10" check digit to "0")
- ITCO technical questions
- List of owner codes (not the official BIC site)
- Online check digit calculator
- Russian maritime register of shipping - BIC representation
- Container numbers validator
- Get container dimensions and type by ISO code
- Cargo container validator ISO 6346 in Javascript
- Container number validation application
Source of article : Wikipedia