Container Number Validator (ISO 6346) + IMO Number Check
Check whether a shipping container number — the 11-character code painted on every box, like MSKU 305438 3 — has a correct ISO 6346 check digit, decode its owner code and category, or calculate the missing check digit from the first 10 characters. An IMO ship-number checker is further down the page. Free, instant, runs in your browser.
How the ISO 6346 check digit works
A container number has four parts: a three-letter owner code registered with the Bureau International des Containers (BIC), a one-letter equipment category identifier (U, J or Z), a six-digit serial number, and a final check digit. Together they read like MSKU 305438 3 — the format you see stencilled on the door of every box in a port.
The check digit is a modulus-11 weighted sum. First, each of the ten leading characters is converted to a number. Digits keep their value; letters are mapped starting at A = 10, but the sequence skips every multiple of 11 so that no letter equals 11, 22 or 33: A=10, B=12, C=13, D=14, E=15, F=16, G=17, H=18, I=19, J=20, K=21, then L jumps to 23, and later U=32 while V jumps to 34, ending at Z=38. The multiples of 11 are excluded because the sum is later reduced modulo 11 — a letter worth exactly 11 or 22 would contribute nothing to the checksum and its typos would slip through undetected.
Second, each value is multiplied by a weight of 2 raised to its position: the first character is weighted 1, the second 2, the third 4, and so on doubling up to 512 for the tenth character. The products are added, the total is divided by 11, and the remainder is the check digit — with one special rule: a remainder of 10 becomes a check digit of 0.
Worked example — CSQU3054383: C=13×1=13, S=30×2=60, Q=28×4=112, U=32×8=256, then the serial 3×16=48, 0×32=0, 5×64=320, 4×128=512, 3×256=768, 8×512=4096. The sum is 6185; 6185 ÷ 11 = 562 remainder 3 — exactly the final digit, so the number is valid. Change any single character and the remainder shifts, which is how the algorithm catches almost every typo before it propagates into a booking or a customs declaration.
Anatomy of a container number
The owner code (first three letters) identifies the company that owns or operates the container: MSK for Maersk, MSC for Mediterranean Shipping, HLC for Hapag-Lloyd. These prefixes are not free-for-all — they are registered with the BIC in Paris, which maintains the only official register. This tool deliberately does not ship a local copy of that register (it changes constantly as lines merge and lessors rebrand); instead, when your number validates, the result links straight to the official BIC search so you can confirm who the prefix belongs to today.
The fourth letter is the equipment category identifier. U marks a freight container — by far the most common, which is why people say containers "always end in U". J marks detachable equipment associated with a container, such as clip-on gensets, and Z marks trailers and chassis. Only these three letters are valid in the fourth position under ISO 6346, and only U-category prefixes are guaranteed to appear in the public BIC register.
The six-digit serial is assigned by the owner and carries no embedded meaning — it is simply a counter within the prefix. That gives each owner code room for a million serials, and because the check digit is computed over prefix and serial together, the same serial under a different owner code produces a different check digit.
The remainder-10 special case
Modulus 11 produces remainders from 0 to 10, but a check digit must be a single character 0–9. ISO 6346 resolves this by mapping remainder 10 to check digit 0 — which means a final 0 is ambiguous: it can come from a sum that divides evenly by 11 or from one that leaves remainder 10. The standard therefore recommends that owners simply skip serial numbers whose sum leaves remainder 10 when numbering new boxes. In practice, though, such numbers were issued in the past and still circulate, so a correct validator — including this one — must accept both cases as valid rather than reject half of them.
Why the check digit matters in practice
Container numbers are hand-keyed constantly: at gate-in kiosks, on bills of lading, in booking confirmations, and in EDI messages like the COPRAR, CODECO and BAPLIE files that terminals and carriers exchange. A single transposed digit in a manifest can send a box to the wrong stack, trigger a customs hold, or make a track-and-trace query silently return nothing. The check digit catches all single-character errors and the vast majority of adjacent transpositions at the moment of entry — which is why terminal operating systems refuse gate moves with a failing check digit, and why validating the column of container numbers in a spreadsheet before uploading it to a carrier portal saves hours of exception handling later.
IMO number check (ships, not boxes)
Ships carry their own lifetime identifier: the IMO number, seven digits usually written as IMO 9074729, assigned once at build and kept through every renaming, reflagging and sale. Its checksum is different from the container scheme: the first six digits are multiplied by weights 7, 6, 5, 4, 3, 2, the products are summed, and the last digit of the sum must equal the seventh digit. For 9074729: 9×7=63, 0×6=0, 7×5=35, 4×4=16, 7×3=21, 2×2=4 — total 139, whose last digit is 9, matching the final digit, so the number is valid.
FAQ
Does a valid check digit mean the container exists?
No. A correct check digit only means the number is well-formed under ISO 6346. Whether the prefix is actually registered to a shipping line is recorded in the BIC register — search the owner code on bic-code.org to confirm it. Checksum validation is a filter against typos, not a registry lookup.
Why is a check digit of 0 ambiguous?
Because two different remainders map to it: a weighted sum with remainder 0 and one with remainder 10 both produce a final digit of 0. For this reason ISO 6346 recommends that owners skip serial numbers whose sum leaves a remainder of 10, but such numbers do exist in circulation and validators must accept them.
What is the difference between a container number and an IMO number?
A container number (ISO 6346) identifies the box itself and travels with the cargo across ships, trucks and trains. An IMO number identifies a ship's hull for life and never changes, even when the vessel is renamed or reflagged. The two use different check-digit algorithms: modulus 11 with doubling weights for containers, a weighted sum with weights 7 down to 2 for IMO numbers.
Validating whole manifests?
Our pay-per-use API validates container numbers and other identifiers in bulk — 25 free calls per month, no card required.
Format and checksum validation only (ISO 6346 and IMO number algorithms). This tool does not confirm that a container or vessel exists, does not query the BIC register or any ship database, and provides links to official sources for registry lookups.