ISO 6346 (International standard for container identification)

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).

More information:

>>> validate('csqu3054383')
>>> validate('CSQU3054384')
Traceback (most recent call last):
InvalidChecksum: ...
>>> format('tasu117 000 0')
'TASU 117000 0'

Calculate check digit and return it for the 10 digit owner code and serial number.


Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.


Reformat the number to the standard presentation format.


Check whether the number conforms to the standard ISO6346. Unlike the validate function, this will not raise ValidationError(s).


Validate the given number (unicode) for conformity to ISO 6346.