OCEAN

Free freight tool

ISO 6346 Container Number Validator

Paste one or up to 100 container numbers to verify their ISO 6346 structure and check digit. Invalid results show the expected full number for review and CSV export.

Recommended next step

Parse the B/L and compare its container and seal evidence.

Short answer

How a container number is validated

A container number is eleven characters: a three-letter owner code, one equipment-category letter, a six-digit serial and a single check digit. To validate it, convert each of the first ten characters to its ISO 6346 numeric value, multiply each value by 2 raised to its zero-based position (1, 2, 4, 8 … 512), add the products, and divide the total by 11. The remainder is the expected check digit; a remainder of 10 is written as 0.

  • Owner code: three letters, registered with the BIC
  • Category identifier: U, J or Z
  • Serial: six digits assigned by the owner
  • Check digit: one digit, derived from the other ten

Check Shipping Container Numbers

  • Validate ISO 6346 check digits
  • Batch-check up to 100 container numbers
  • Find transcription errors
  • Export a validation audit

ISO 6346 Check Digit Calculation

Letters are converted to ISO 6346 numeric values, multiplied by powers of two, summed and reduced to the expected check digit.

A valid check digit confirms number structure, not ownership, availability, physical condition or current tracking status.

Anatomy of an ISO 6346 container number

ISO 6346 is the international standard that governs how freight containers are identified and marked. The visible identifier painted on the door and printed on the Bill of Lading has four parts, and each part answers a different question. Reading them separately is the fastest way to spot a bad number before it reaches a carrier system, a customs filing or a terminal gate.

The number is written without spaces in electronic data even though it is usually painted with a gap before the check digit. Any validator, including this one, should strip spaces, hyphens and lower case before it does arithmetic — otherwise a perfectly good number fails for cosmetic reasons.

The four parts of MSCU 123456 7
PartCharactersExampleWhat it tells you
Owner code3 lettersMSCThe registered container owner or principal operator, allocated through the Bureau International des Conteneurs (BIC)
Equipment category1 letterUU = freight container, J = detachable freight-container-related equipment, Z = trailers and chassis
Serial number6 digits123456Assigned by the owner. It carries no meaning about size, type, age or contents
Check digit1 digit7Calculated from the other ten characters. Its only job is to catch transcription errors

Owner codes always end in U, J or Z when combined with the category identifier — that is why almost every container number you see reads as four letters followed by seven digits.

The ISO 6346 check digit formula

The check digit is a modulo-11 checksum with positional weights. Letters are not simply A=1, B=2. ISO 6346 assigns A=10 and then counts upward while skipping every multiple of 11 — so 11, 22 and 33 are never used as letter values. That skip is deliberate: it stops two different letters from producing the same remainder and therefore cancelling each other out in the sum.

Each of the first ten characters is multiplied by 2 raised to the power of its zero-based position. The first character is multiplied by 1, the second by 2, the third by 4, and so on up to the tenth character which is multiplied by 512. Doubling weights make the checksum sensitive to both a wrong character and two characters swapped, which are the two mistakes humans and OCR engines actually make.

ISO 6346 letter values
LettersValues
A B C D E F G H I10, 12, 13, 14, 15, 16, 17, 18, 19
J K L M N O P Q R20, 21, 23, 24, 25, 26, 27, 28, 29
S T U V W X Y Z30, 31, 32, 34, 35, 36, 37, 38

The gaps after K (21→23), U (32→34) and before J (19→20) are where the multiples of 11 have been skipped.

Worked example: validating CSQU3054383

CSQU3054383 is the example used in the standard itself, which makes it a useful reference case for testing any implementation. Work left to right: convert, weight, multiply, then sum.

The products are 13, 60, 112, 256, 48, 0, 320, 512, 768 and 4096, which total 6185. Dividing 6185 by 11 gives 562 with a remainder of 3. The expected check digit is therefore 3, which matches the printed final digit, so the number is structurally valid.

Step-by-step calculation for CSQU3054383
PositionCharacterValueWeightProduct
1C13113
2S30260
3Q284112
4U328256
5331648
600320
75564320
844128512
933256768
10885124096
Sum6185

6185 ÷ 11 = 562 remainder 3 → check digit 3. Had the remainder been 10, the printed digit would be 0.

Why a remainder of 10 becomes 0

The check character has to fit in one digit. Modulo 11 can return 10, which needs two characters, so the standard maps that single case to 0. It is the one place where a valid check digit does not equal the raw remainder, and it is the most common bug in home-made validators.

What the size and type code beside the number means

Directly under or beside the container number you will usually see a four-character size-and-type code, also defined by ISO 6346. It is a separate field and it is not covered by the check digit. Operators frequently confuse the two, then wonder why a validator passes a number that clearly belongs to the wrong equipment.

The first character is length, the second is height and width, and the last two describe the container type. Reading it lets you sanity-check a document: a Bill of Lading that lists 45G1 equipment but shows a 20ft freight rate deserves a second look before it is approved.

Common ISO 6346 size and type codes
CodeEquipmentNominal lengthNominal height
22G120ft general purpose20 ft8 ft 6 in
42G140ft general purpose40 ft8 ft 6 in
45G140ft high cube40 ft9 ft 6 in
L5G145ft high cube45 ft9 ft 6 in
22R120ft refrigerated20 ft8 ft 6 in
45R140ft high-cube reefer40 ft9 ft 6 in
22U120ft open top20 ft8 ft 6 in
22T120ft tank container20 ft8 ft 6 in

How to check a batch of container numbers

The checker accepts up to 100 numbers at a time, one per line or separated by commas, because container references usually arrive as a block: a stuffing report, a carrier manifest, a customs annex or a column pasted out of a spreadsheet. Batch checking is where check digits earn their keep — a single transposed pair in a list of forty is almost invisible to the eye and completely obvious to the arithmetic.

  1. 1Paste the container numbers exactly as they appear on the source document, including any spaces — the checker normalises them for you.
  2. 2Read the status column first: pass means the printed check digit matches, fail means it does not, and a structural error means the input is not eleven ISO 6346 characters at all.
  3. 3For any failure, compare the expected full number shown by the checker against the container door photo, the equipment interchange receipt or the carrier's own record before you correct anything.
  4. 4Correct the value at its source — the stuffing record, the shipping instruction or the draft B/L — rather than only in the downstream copy you happen to be working in.
  5. 5Export the CSV audit and attach it to the shipment file so the check is evidenced if the number is later disputed.

A failed check digit is not always a typo in your file

Occasionally the container itself is marked incorrectly, or a carrier system has propagated a bad number for years. When the door plate and the documents agree but the arithmetic does not, escalate to the carrier rather than silently 'fixing' the number — changing a reference that appears on a released Bill of Lading creates a bigger problem than the one you solved.

What a valid check digit does and does not prove

This is the single most misunderstood point about container validation. The check digit is a transcription safeguard. It confirms that eleven characters are internally consistent — nothing more. It is computed from the number itself, so anyone can invent a structurally valid container number in a few seconds.

A passing check digit confirms

That the eleven characters form a well-formed ISO 6346 identifier and that the number has most likely survived copying, scanning or keying without corruption.

  • The owner code is three letters and the category identifier is U, J or Z
  • The serial is six digits
  • The printed check digit matches the modulo-11 calculation

A passing check digit does not confirm

Anything about the physical box or the shipment attached to it. Every operational fact still has to come from the carrier, the terminal or a physical inspection.

  • That the owner code is actually registered with the BIC to a real operator
  • That the container exists, is in service, or is not scrapped
  • That it is currently loaded with the cargo on your documents
  • That the seal number, size, type or tare weight on the document is correct
  • That the box is roadworthy or holds a valid CSC safety-approval plate

Where container number errors cause real damage

The cost of a wrong container number is rarely the correction itself — it is the downstream process that silently fails. Because container numbers key almost every automated message in ocean freight, one bad character can break the link between a shipment and its own paperwork.

  • Customs entries that reference a container the carrier's manifest does not contain, triggering a mismatch hold
  • Terminal gate rejections when a haulier presents a booking whose equipment reference does not exist
  • Failed EDI messages and track-and-trace lookups that return nothing, so nobody notices the shipment has gone quiet
  • Delivery orders released against the wrong box, producing a misdelivery claim
  • Demurrage and detention invoices that cannot be reconciled because the equipment reference does not match your own records
  • Insurance and claims documentation that fails to prove which container held the damaged cargo

Container Number Checker FAQ

Practical answers to the questions operators, forwarders and shippers ask most often about container number check results.

What is the ISO 6346 check digit formula in one line?

Check digit = (Σ character value × 2^position) mod 11, using zero-based positions 0 to 9 for the first ten characters, with letter values A=10 counting upward while skipping every multiple of 11, and with a remainder of 10 written as 0.

Why do almost all container numbers have U as the fourth letter?

The fourth character is the equipment category identifier. U is assigned to freight containers, which is the overwhelming majority of equipment you will see on a Bill of Lading. J marks detachable freight-container-related equipment such as a clip-on generator set, and Z marks trailers and chassis. If you see a J or Z where you expected a shipping container, the document may be describing something other than the box itself.

Can two different containers have the same number?

They should not. The owner code is allocated centrally through the BIC and the serial is controlled by the owner, so the combination is intended to be unique. In practice, duplicates appear when an owner code is reassigned after a company exits the market and the old boxes are still circulating, or when a number is reused after a long interval. If a lookup returns two live records for the same number, treat it as a data-quality issue and confirm with the carrier rather than assuming one record is wrong.

Does the checker tell me who owns the container?

No. It validates structure and arithmetic only. The owner code prefix is a strong hint — most three-letter prefixes are recognisable to anyone who works in ocean freight — but the authoritative registry of owner codes is maintained by the BIC, and this tool does not query it. Do not infer ownership, and never infer liability, from a prefix alone.

How many container numbers can I check at once?

Up to 100 per batch. Paste them one per line, comma-separated or copied straight out of a spreadsheet column; spaces, hyphens and lower case are normalised before the calculation. Every row is reported separately with a pass, fail or structural-error status, and the whole batch can be exported as a CSV audit file.

The check digit fails but the number is definitely correct. What now?

First, confirm you have all eleven characters and that no digit has been dropped or duplicated during copying — this accounts for most cases. Then compare the document against a photograph of the container door, because scanned or faxed paperwork frequently turns 8 into B, 0 into O, 5 into S and 1 into I. If the door plate and the document genuinely agree and the arithmetic still fails, the container is mis-marked; report it to the carrier and record their written confirmation rather than editing the reference yourself.

Is the check digit the same as a seal number?

No, and they are never interchangeable. The check digit is one character derived from the container number. A seal number is an independent identifier on the physical security seal fitted after stuffing, issued by whoever sealed the box. Both belong on the Bill of Lading and packing list, and a mismatch between the seal on the document and the seal on the container at delivery is a cargo-security event, not a clerical one.

Do container numbers ever contain letters in the serial?

No. Under ISO 6346 the six-character serial is numeric. If you are looking at a reference with letters after the category identifier, you are probably looking at a booking number, an equipment interchange receipt number or an internal reference rather than a container number — and it should not be validated with this formula.

Does a valid container number mean the shipment is real?

No. Because the check digit is calculated from the number itself, a structurally valid number can be fabricated instantly. Container number validation is a data-quality control, not a fraud control. Confirm the existence of cargo through the carrier's own booking and manifest systems, and treat unexpected documents referencing valid-looking numbers with the same caution as any other unverified claim.

Should I validate container numbers before or after customs filing?

Before, without exception. A container reference that does not exist on the carrier's manifest is one of the more common causes of a mismatch hold, and correcting a filed entry costs far more time than checking a list. The practical habit is to validate at the point the number first enters your system — the stuffing report or the shipping instruction — so the error never propagates.

Can GainingDocx check container numbers automatically inside documents?

Yes. When you extract a Bill of Lading, sea waybill, packing list or arrival notice in the workspace, every container number found on the page is put through this same deterministic calculation. Failures are flagged inline with the expected number so you can resolve them during review rather than discovering them after export.

Is my data uploaded when I use this checker?

The container-number calculation is deterministic arithmetic and runs without storing your list against an account. If you want the check to become part of a retained shipment record — with the source document, the review trail and the export attached — run the document through the workspace instead, where storage is explicit and deletable.

Related tools, templates and guides