Postal sorting is the technical process of categorizing and routing mail items based on destination, size, weight, and class, enabling efficient delivery through postal networks. In information technology, this process heavily relies on automated systems including optical character recognition (OCR), barcode encoding, sorting algorithms, and mechanical conveyor-based machines to handle high volumes of mail with speed and accuracy. The evolution from manual sorting to fully automated digital workflows represents a key intersection of logistics, computer vision, and operations research.
1 History
1.1 Manual sorting
Before mechanization, postal workers sorted mail entirely by hand. Letters and parcels were read for destination addresses, then placed into pigeonholes or bags corresponding to cities, regions, or postal routes. This labor-intensive method required extensive training and was prone to human error. Throughput was limited by the speed of a sorter's reading and manual dexterity, typically a few hundred items per hour.
1.2 Mechanization
The first mechanical aids appeared in the early 20th century. Conveyor belts and simple chutes reduced walking distances for sorters. In the 1920s, the British Post Office introduced the "transposer" system, which used a keyboard to direct letters to bins. However, true mechanization began with the development of letter-facing machines that could orient envelopes uniformly, and with canceling machines that printed postmarks automatically. These devices cut labor costs and doubled throughput, but humans still read addresses.
1.3 Automation
Full automation emerged in the 1960s with the integration of optical character recognition (OCR). The US Postal Service deployed its first OCR system in 1965 for reading typed addresses. By the 1980s, barcodes printed directly on envelopes allowed machines to sort items without human intervention. Subsequent decades saw the rise of high-speed sorting machines, video coding systems for difficult addresses, and real-time data networks. Modern automated plants process hundreds of thousands of pieces per hour.
2 Technologies
2.1 Optical character recognition (OCR)
2.1.1 Address reading
OCR systems scan the address block on a mail piece and convert printed text into machine-readable data. Advanced algorithms handle multiple fonts, sizes, and orientations. The system must isolate the destination address from sender information and extraneous markings.
2.1.1.1 Character segmentation
Before recognition, the system divides the image into individual characters. This step is critical: connected or broken characters degrade accuracy. Algorithms analyze pixel blobs, estimate baseline, and separate overlapping glyphs using vertical projection and contour analysis.
2.1.1.2 Line detection
Address lines are detected by grouping character regions into horizontal strings. Heuristics such as line spacing, indentation, and presence of numeric sequences (e.g., ZIP codes) help identify the last line as the destination. Machine learning models now augment rule-based approaches for robustness.
2.1.2 Handwriting recognition
Handwritten addresses present greater variability. Systems combine neural networks (often convolutional or recurrent) trained on millions of handwritten samples with context constraints (e.g., the city name must match a known directory). Recognition rates for cursive handwriting are lower than for print, so many systems use a video coding fallback where human operators interpret ambiguous images.
2.2 Barcode systems
2.2.1 Intelligent Mail barcode
The Intelligent Mail barcode (IMb) is a 4-state barcode used by the United States Postal Service. It encodes up to 31 digits, including routing code (ZIP+4), mailer ID, and a unique serial number. The IMb replaces older POSTNET codes and enables tracking, sorting, and mail piece-level visibility.
2.2.2 Matrix codes
Two-dimensional matrix codes, such as Data Matrix and QR codes, are increasingly used on parcels and flats. They store more information (e.g., full address, weight, sender details) in a compact area, and can be read even if partially damaged. Their use supports automated sorting of irregularly shaped items.
2.3 Sorting machines
2.3.1 Tilt-tray sorters
Tilt-tray sorters consist of a continuous loop of trays that tilt to discharge items into chutes or bins. Each tray carries one parcel. As the tray passes a destination, a mechanism tips it, sliding the parcel off. These systems handle a wide range of sizes (up to 50 kg) and achieve speeds of 5–10 items per second.
2.3.2 Cross-belt sorters
Cross-belt sorters use short belt segments mounted on a moving carriage. The belt runs perpendicular to the main conveyor to eject items sideways. This design provides gentle handling for fragile goods and can sort mixed loads with high precision. They are common in express courier hubs.
2.3.3 Flats sorting machines
Flats sorting machines handle large envelopes, magazines, and padded bags. These items require careful feeding to avoid jams. Machines use vacuum belts, pinch rollers, and OCR for address reading. They sort into multiple bins (often 200+ outputs) and sequence by carrier route.
3 Algorithms and software
3.1 Routing algorithms
3.1.1 Zip code based routing
Routing begins with the ZIP code (or equivalent postal code). Software looks up a routing table that maps each code to a processing facility, truck route, and delivery unit. For international items, the country code is used to select a gateway. This is a simple but effective method requiring frequent table updates from postal authorities.
3.1.2 Geocoding
Geocoding converts a full street address into geographic coordinates (latitude/longitude). The coordinates then map to delivery points via spatial databases. Geocoding enables fine-grained sorting, such as carrier-route sequence, and supports dynamic rerouting when weather or traffic disrupts planned paths.
3.2 Mail flow optimization
3.2.1 Batch processing
Mail from many collection points is aggregated and processed in batches. Software schedules batches to minimize idle time on sorting machines, balance workload across facilities, and meet service-level agreements. Batch-size optimization reduces transportation costs by filling containers optimally.
3.2.2 Real-time sorting
As mail passes through OCR and barcode readers, data is streamed to a central control system. Sorting decisions are made in milliseconds: which bin, which outgoing container, which truck. Real-time dashboards monitor machine throughput and alert operators to bottlenecks. This just-in-time approach reduces dwell time.
4 Mail processing workflow
4.1 Preparation
4.1.1 Culling
Culling removes items that cannot be machine-processed: those with excessive size, odd shapes, protruding contents, or insufficient postage. These are set aside for manual handling. The culling process also separates mail classes (letters, flats, parcels) and rejects items with missing addresses.
4.1.2 Facing
Facing machines orient all envelopes so that stamps are in the upper-right corner and addresses are facing the same direction. Optical sensors detect the stamp location and rotate envelopes using rotating drums or air jets. Proper facing ensures that downstream OCR cameras can capture the address consistently.
4.1.3 Cancellation
Cancellation marks the stamp to prevent reuse and imprints a postmark indicating date and origin. High-speed cancelers apply the mark via inkjet or die contact while the envelope moves continuously. Cancellation is often integrated with the facing machine.
4.2 Sorting stages
4.2.1 Primary sorting
In primary sorting, mail is grouped by broad destination, e.g., state, province, or regional postal center. Machine-readable items are directly sorted to bins; unreadable items are diverted to video coding stations. The output is packed into trays or sacks labeled for the next facility.
4.2.2 Secondary sorting
At the receiving facility, secondary sorting divides mail by city, post office, or postal zone. Again, OCR and barcodes are used. For items already carrying a barcode from primary sort, the machine reads that code and bypasses OCR, increasing speed.
4.2.3 Delivery point sequencing
The final sorting stage arranges mail in the exact order of delivery (carrier route sequence). Sorting machines use the delivery point routing code (e.g., the last two digits of the ZIP+4) to assign each item to a specific bin representing a sequential stop. This eliminates manual sorting by the carrier, saving labor.
5 Challenges and future trends
5.1 Handling non-standard items
Odd-shaped parcels, poly bags, and cylindrical tubes challenge automated systems. Current machines use adjustable belts and specialized feeders, but jams and misreads remain common. Research into flexible grippers and 3D scanning promises better handling, but cost and retrofit issues delay adoption.
5.2 Integration with digital mail
As paper mail volumes decline, postal operators are exploring hybrid services where electronic documents are printed and sorted near destination. Seamless integration between digital submission and physical sorting requires unified APIs and data standards. The hardware-software interface must accommodate both physical and virtual mail streams.
5.3 Machine learning in address interpretation
Deep learning models are improving handwriting recognition and address parsing. Convolutional neural networks (CNNs) can read even distorted or poorly lit addresses. Natural language processing (NLP) disambiguates similar place names and recognizes aliases (e.g., "NYC" for "New York City"). These models require large labeled datasets and continuous retraining to adapt to changes in address formats and handwriting styles. Future systems may also incorporate reinforcement learning to dynamically adjust sorting priorities based on real-time network conditions.