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.
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
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
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.
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.
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 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.
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.
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.
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.
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.
Nigeria NIN Slip OCR Python SDK
Python Tutorial: Automate KYC in Nigeria. Extract data from NIN Slip using StructOCR Python SDK. Supports native text.
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.
Technical Comparisons & Integrations
Explore platform integrations and competitive analysis
Add Container OCR using Cursor in 5 Minutes
Step-by-step guide to integrating the StructOCR shipping container API using the Cursor AI code editor. Build logistics and yard management tools rapidly.
Google Cloud Vision vs. StructOCR API for Shipping Containers
Comparing generic enterprise OCR solutions like Google Cloud Vision against StructOCR's purpose-built API for ISO 6346 shipping container recognition.
Add Container OCR to Your Lovable.dev App in 5 Minutes
Step-by-step guide to integrating the StructOCR shipping container API into a Lovable.dev app. Build logistics and yard management tools with zero backend.
Manual TOS Entry vs. Container OCR Automation API
Analyzing the ROI and operational efficiency of replacing manual gate checkers with an automated Container OCR API in logistics yards.
Add Container OCR to Your Replit App in 5 Minutes
Step-by-step guide to integrating the StructOCR shipping container API into a Replit application. Build logistics and yard management tools using Replit Agent and Secrets.
Tesseract OCR vs. StructOCR API for ISO 6346 Container Numbers
A technical comparison for developers evaluating open-source Tesseract vs. a dedicated cloud API for extracting shipping container numbers.
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.