Standards/deutsche-post-leitcode
Deutsche Post Leitcode
Overview
Deutsche Post Leitcode (German Leitcode, "routing code") is a numeric barcode used by Deutsche Post AG and its logistics division DHL for the automatic distribution of freight shipments in mail centers [1, 2]. It is not an independent symbology but an application of the Interleaved 2 of 5 (ITF) barcode: the bars and spaces are encoded exactly like standard ITF, but the data layout is fixed and the check digit is computed with a Deutsche-Post-specific algorithm rather than the ordinary ITF checksum [1, 2, 3].
The Leitcode encodes where a shipment is going — postal code, street, house number, and a product code — and is therefore the routing counterpart to the Deutsche Post Identcode, which identifies which shipment it is. The two codes are typically printed together on the same label and used jointly in the sorting process [2]. A Leitcode always carries a fixed 14 digits (13 data digits plus one check digit) [1, 2, 3].
History
The Leitcode and Identcode are the two postal applications of the Interleaved 2 of 5 symbology adopted by Deutsche Post AG (and inherited by DHL after Deutsche Post's logistics operations were consolidated under the DHL brand) for domestic German freight automation [2, 6]. The underlying ITF symbology itself was created by David Allais, who also designed Code 39, Code 93, and Code 11 [7]. Detailed dating of the Leitcode's introduction is not established by the sources consulted here; what is documented is its current role as one of "two variations of the Interleaved 2 of 5 (ITF) barcode" that Deutsche Post and DHL use for routing versus fulfilment information [6].
Technical specification
Symbology basis. The Leitcode is "a variant of the Interleaved 2 of 5 symbology" [8] / "an application of Code 2 of 5 interleaved" [3]. As with all ITF codes, digits are encoded in pairs — the first digit of a pair in five bars, the second in the five interleaved spaces — with two of every five elements wide [7]. Because digits are paired, an ITF symbol must encode an even number of digits; the 14-digit Leitcode satisfies this directly [7, 8]. The symbol consists of a leading quiet zone, a start pattern (narrow bar, narrow space, narrow bar, narrow space), the interleaved data characters, a stop pattern (wide bar, narrow space, narrow bar), and a trailing quiet zone [8].
Digit layout (14 digits). [1, 2, 3, 8]
| Positions | Field | German term | Example |
|---|---|---|---|
| 1–5 | Postal code (PLZ) | Postleitzahl | 21348 |
| 6–8 | Street code | Straßencode | 075 |
| 9–11 | House number | Hausnummer | 016 |
| 12–13 | Product code | Produktcode | 40 |
| 14 | Check digit | Prüfziffer | 1 |
The street code is a numeric surrogate for the street name, because the barcode cannot carry the full text [2]. The two-digit product code distinguishes shipment types — for example 00 for normal parcels, 33 for returns, 40 for small parcels [2].
Check digit (Modulo 10, weights 4 and 9). The Leitcode check digit "deviates from the 2 of 5 interleaved standard": instead of the ordinary ITF weights of 3 and 1, the 13 data digits are weighted alternately 4 and 9 beginning from the left, the products are summed, the sum is reduced modulo 10, and the check digit is the complement to 10 of that remainder [3, 4, 5]. Equivalently, the check digit is the amount needed to round the weighted sum up to the next multiple of 10 — a formulation that handles the edge case automatically (when the sum is already a multiple of 10, the check digit is 0) [5].
Worked example for data 2134807501640 [3]:
Digits: 2 1 3 4 8 0 7 5 0 1 6 4 0
Weights: 4 9 4 9 4 9 4 9 4 9 4 9 4
Products: 8 9 12 36 32 0 28 45 0 9 24 36 0 -> sum = 239
239 mod 10 = 9 -> check digit = 10 - 9 = 1
Full Leitcode: 21348075016401
This 4/9 weighting is identical to the algorithm used by the Deutsche Post Identcode; the two differ only in data length (13 vs 11 data digits) and field meaning [3, 4].
Routing vs tracking. The Leitcode is a routing code: it tells the sorting machinery the destination (PLZ + street + house + product), so the same physical destination can appear on many different shipments. The Identcode is a tracking code: it uniquely identifies one mail piece for Track & Trace. The two are complementary and are used together for automatic distribution [1, 2].
Use cases
- Automatic freight distribution in Deutsche Post / DHL mail centers — the Leitcode drives the sorting machinery to route a shipment to the correct destination [1, 2].
- Address-encoded routing on parcel and freight labels, paired with the Identcode for end-to-end handling [2].
- Supported as a labelling option in commercial reporting and label tools (DevExpress, FastReport, BarTender, Bytescout, Neodynamic, Aspose) where German postal compliance is needed [8].
Implementations
Leitcode is rarely a hand-rolled symbology; it is instead a preset in general barcode libraries, which apply the fixed 14-digit layout and the 4/9 check digit on top of their Interleaved 2 of 5 engine.
- zint/zint — C, ~771★, active 2026. Broad encoding library (50+ symbologies) that supports Deutsche Post Leitcode and Identcode [2 context; repo metadata].
- woo-j/OkapiBarcode — Java, ~394★, active 2026. Open-source generator covering 50+ standards including Deutsche Post Leitcode/Identcode.
- bwipp/postscriptbarcode (BWIPP, Barcode Writer in Pure PostScript) — PostScript, ~360★, active 2026. Documents and implements Leitcode as an ITF application; auto-computes the check digit when 13 digits are supplied [1].
- rafsalvioni/zeus-barcode-dhl — PHP, ~1★, active 2025. Object-oriented API to create, draw, and manipulate barcode data using DHL (Deutsche Post) standards.
- ActiveBarcode (commercial) auto-calculates the modulo-10 check digit for Leitcode input [2]; the Perl module Algorithm::CheckDigits::M10_005 implements the shared Identcode/Leitcode 4/9 check digit [4].
Comparison
Leitcode vs Identcode. Both are ITF applications by Deutsche Post and share the identical 4/9 modulo-10 check digit, but they answer different questions [1, 2, 3]:
| Property | Leitcode | Identcode |
|---|---|---|
| Role | Routing / destination | Identification / tracking |
| Total length | 14 digits | 12 digits |
| Data digits | 13 | 11 |
| Field layout | PLZ + street + house + product | mail center + customer ID + mailing number |
| Question answered | Where is it going? | Which item is it? |
Both vs plain ITF-14. All three are Interleaved 2 of 5 codes, but they diverge on length and checksum [3, 7]:
- ITF-14 is the GS1 application of ITF carrying a 14-digit GTIN (SCC-14) on shipping cartons/cases, computed with the standard mod-10 check digit (weights 3 and 1) and usually surrounded by a bearer bar to equalise print pressure [7].
- Leitcode is also 14 digits but is not a GTIN — it is an address-routing string and uses the Deutsche Post 4/9 check digit, not the GS1 3/1 check digit [3, 8].
- Identcode is 12 digits with the same 4/9 check digit.
So Leitcode and ITF-14 are both "14-digit ITF" yet are mutually incompatible in meaning and checksum; a generic ITF-14 reader would mis-validate a Leitcode and vice versa.
Status
The Leitcode is in active production use by Deutsche Post / DHL for automatic freight distribution and remains a standard preset across mainstream barcode libraries and commercial label tooling as of 2026 [1, 2, 6]. It coexists with 2D codes — Deutsche Post and DHL also make heavy use of Data Matrix for newer applications — but the 1D Leitcode/Identcode pair remains the documented routing/tracking format for the freight network [6].
Sources
- Deutsche Post Leitcode — BWIPP wiki — Barcode Writer in Pure PostScript, 2026
- Leitcode (Deutsche Post, DHL) barcode symbology — ActiveBarcode
- Leitcode Deutsche Post AG — IDEAL Software Programming Manual
- Algorithm::CheckDigits::M10_005 — Deutsche Post Identcode/Leitcode (DE) — MetaCPAN
- Modulo 10 check-digit calculation for barcodes — ActiveBarcode
- Postal barcodes and how to read them — Scanbot SDK
- Interleaved 2 of 5 — Wikipedia
- Deutsche Post Leitcode — Barcode Guide — Seagull Scientific (BarTender)
Deployments
No country reports mention this standard by name.