ISO 6346 Container Number Structure Explained

How a shipping container number is built: owner code, equipment category, serial number, and check digit, with examples.

Four parts

A container number has 11 characters: a three-letter owner code, a one-letter equipment category identifier, a six-digit serial number, and a check digit.

Extracting It Automatically

When you read this data from photos, the Container Number OCR API returns it as structured JSON, and you can apply the rules on this page as validation. Try it with the free scanner.

Where This Fits

  • Equipment category: U marks freight containers, J detachable freight-container equipment, and Z trailers and chassis.
  • Owner codes: Owner codes are registered with the Bureau International des Containers (BIC), which is why the combined prefix is often called a BIC code.
  • Markings: Numbers appear on doors, sides, and roofs, sometimes vertically. The size and type code is printed nearby.
Need more testing? Create a free account to get 200 free credits (equals 200 Container scans).

Extract It with the API

Read the document from a photo and validate the returned fields.

Prerequisite: Python 3.9+, `pip install requests`, and a STRUCTOCR_API_KEY

PYTHON EXAMPLE
import base64
import os
import requests

with open("container.jpg", "rb") as image_file:
    image = base64.b64encode(image_file.read()).decode("ascii")

response = requests.post(
    "https://api.structocr.com/v1/container",
    headers={"x-api-key": os.environ["STRUCTOCR_API_KEY"]},
    json={"img": image},
    timeout=30,
)
response.raise_for_status()
data = response.json()["data"]
print("container_number:", data.get("container_number"))
print("is_valid:", data.get("is_valid"))
print("confidence:", data.get("confidence"))

Technical Specs

  • •Endpoint: POST https://api.structocr.com/v1/container
  • •Authentication: x-api-key request header
  • •Inputs: JPG, PNG, or WebP as Base64 JSON; maximum 4.5MB
  • •Price: 1 credit per successful request; failed requests are not billed
  • •Free trial: 200 free credits on sign-up, no credit card required

Key Features

  • •Equipment category: U marks freight containers, J detachable freight-container equipment, and Z trailers and chassis.
  • •Owner codes: Owner codes are registered with the Bureau International des Containers (BIC), which is why the combined prefix is often called a BIC code.
  • •Markings: Numbers appear on doors, sides, and roofs, sometimes vertically. The size and type code is printed nearby.
  • •Validate after OCR: Apply these rules to API output before storing it.

Reference Summary

Key facts from this page in structured form, for quick lookup.

{
  "Four parts": "A container number has 11 characters: a three-letter owner code, a one-letter equipment category identifier, a six-digit serial number, and a check digit..",
  "Equipment category": "U marks freight containers, J detachable freight-container equipment, and Z trailers and chassis..",
  "Owner codes": "Owner codes are registered with the Bureau International des Containers (BIC), which is why the combined prefix is often called a BIC code..",
  "Markings": "Numbers appear on doors, sides, and roofs, sometimes vertically."
}

Frequently Asked Questions

Is the BIC code the same as the container number?

The BIC code usually means the four-letter owner prefix. The container number adds the serial and check digit.

Does StructOCR split the number into parts?

Yes. The API returns owner code, category, serial number, and check digit, and an is_valid flag.

You May Also Like

Related tutorials, platform guides, and comparisons

Tutorial

Anyline Container Scanner Alternative: Container Number OCR API

Anyline Container Scanner compared with the StructOCR REST API for container number extraction: deployment, pricing model, and when each fits.

Container
Tutorial

Java Shipping Container OCR API

Upload an image for a free test! Tutorial: Learn how to use the StructOCR Java Client to extract data from Shipping Containers. Extract ISO 6346 container numbers and check them against the ISO check digit.

Java · Container
Tutorial

Container Number OCR API Pricing and Cost per Scan

What container number OCR costs with StructOCR: 1 credit per successful scan, prepaid credits that never expire, and no charge for failed requests.

Container
Tutorial

Container Size and Type Codes (22G1, 45G1, 45R1)

Read ISO 6346 size and type codes such as 22G1, 42G1, 45G1, and 45R1 to tell container length, height, and type apart.

Container
Tutorial

Node.js Shipping Container OCR API

Tutorial: How to use the StructOCR Node.js SDK to extract data from Shipping Containers. Upload an image for a free test! Includes code samples and JSON schema.

Node.js · Container
Tutorial

ISO 6346 Container Check Digit Calculation

Calculate and validate a shipping container check digit: letter values that skip multiples of 11, powers of two, and Python code.

Container
Country Tutorial

Nigeria Passport OCR with Node.js SDK

Use the official StructOCR Node.js SDK with TypeScript and Express to extract structured MRZ and VIZ data from Nigeria passports.

Node.js · Passport
Country Tutorial

Nigeria Passport OCR with Python SDK

Use the official StructOCR Python SDK and FastAPI to extract structured MRZ and VIZ data from Nigeria passports with a server-side integration.

Python · Passport
Country Tutorial

Nigeria NIN Slip OCR Python SDK

Python Tutorial: Automate KYC in Nigeria. Extract data from NIN Slip using StructOCR Python SDK. Supports native text.

Python · nin slip & e-id
Country Tutorial

New Zealand Passport OCR with Python SDK

Use the official StructOCR Python SDK and FastAPI to extract structured MRZ and VIZ data from New Zealand passports with a server-side integration.

Python · Passport

Technical Comparisons & Integrations

Explore platform integrations and competitive analysis

From tutorial to production in 5 minutes.

You've seen the code. Now get your API key, grab your 200 free credits, and see it work with your own images. No credit card required.

Instant Access Cancel Anytime No Credit Card