# Deutsche Post Leitcode

> Source: https://docs.barcoder.ai/docs/standards/deutsche-post-leitcode
> research date 2026-06-03 · extracted at 2026-10-03
> Publisher: Barcoder — encyclopedia of QR, barcode and payment-code standards

Specifications:
- [Deutsche Post Leitcode — BWIPP wiki](https://github.com/bwipp/postscriptbarcode/wiki/Deutsche-Post-Leitcode)
- [Leitcode (Deutsche Post, DHL) — ActiveBarcode](https://www.activebarcode.com/barcode/leitcode/)
- [Leitcode Deutsche Post AG — IDEAL Software](https://www.idealsoftware.com/manuals/progman/leitcodedeutschepostag.html)

## 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** <sup>[1][1], [2][2]</sup>. 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 <sup>[1][1], [2][2], [3][3]</sup>.

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 <sup>[2][2]</sup>. A Leitcode always carries a fixed **14 digits** (13 data digits plus one check digit) <sup>[1][1], [2][2], [3][3]</sup>.

## 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 <sup>[2][2], [6][6]</sup>. The underlying ITF symbology itself was created by David Allais, who also designed Code 39, Code 93, and Code 11 <sup>[7][7]</sup>. 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 <sup>[6][6]</sup>.

## Technical specification

**Symbology basis.** The Leitcode is "a variant of the Interleaved 2 of 5 symbology" <sup>[8][8]</sup> / "an application of Code 2 of 5 interleaved" <sup>[3][3]</sup>. 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 <sup>[7][7]</sup>. Because digits are paired, an ITF symbol must encode an even number of digits; the 14-digit Leitcode satisfies this directly <sup>[7][7], [8][8]</sup>. 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 <sup>[8][8]</sup>.

**Digit layout (14 digits).** <sup>[1][1], [2][2], [3][3], [8][8]</sup>

| 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 <sup>[2][2]</sup>. The two-digit product code distinguishes shipment types — for example `00` for normal parcels, `33` for returns, `40` for small parcels <sup>[2][2]</sup>.

**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 <sup>[3][3], [4][4], [5][5]</sup>. 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) <sup>[5][5]</sup>.

Worked example for data `2134807501640` <sup>[3][3]</sup>:

```
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 <sup>[3][3], [4][4]</sup>.

**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 <sup>[1][1], [2][2]</sup>.

## 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 <sup>[1][1], [2][2]</sup>.
- **Address-encoded routing on parcel and freight labels**, paired with the Identcode for end-to-end handling <sup>[2][2]</sup>.
- Supported as a labelling option in commercial reporting and label tools (DevExpress, FastReport, BarTender, Bytescout, Neodynamic, Aspose) where German postal compliance is needed <sup>[8][8]</sup>.

## 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](https://github.com/zint/zint)** — C, ~771★, active 2026. Broad encoding library (50+ symbologies) that supports Deutsche Post Leitcode and Identcode [[2][2] context; repo metadata].
- **[woo-j/OkapiBarcode](https://github.com/woo-j/OkapiBarcode)** — Java, ~394★, active 2026. Open-source generator covering 50+ standards including Deutsche Post Leitcode/Identcode.
- **[bwipp/postscriptbarcode](https://github.com/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 <sup>[1][1]</sup>.
- **[rafsalvioni/zeus-barcode-dhl](https://github.com/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 <sup>[2][2]</sup>; the Perl module **Algorithm::CheckDigits::M10_005** implements the shared Identcode/Leitcode 4/9 check digit <sup>[4][4]</sup>.

## 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 <sup>[1][1], [2][2], [3][3]</sup>:

| 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 <sup>[3][3], [7][7]</sup>:

- **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 <sup>[7][7]</sup>.
- **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 <sup>[3][3], [8][8]</sup>.
- **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 <sup>[1][1], [2][2], [6][6]</sup>. 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 <sup>[6][6]</sup>.

## Sources

[1]: https://github.com/bwipp/postscriptbarcode/wiki/Deutsche-Post-Leitcode
[2]: https://www.activebarcode.com/barcode/leitcode/
[3]: https://www.idealsoftware.com/manuals/progman/leitcodedeutschepostag.html
[4]: https://metacpan.org/pod/Algorithm::CheckDigits::M10_005
[5]: https://www.activebarcode.com/codes/checkdigit/modulo10
[6]: https://scanbot.io/blog/postal-barcodes-and-how-to-read-them/
[7]: https://en.wikipedia.org/wiki/Interleaved_2_of_5
[8]: https://barcodeguide.seagullscientific.com/Content/Symbologies/Leitcode.htm

1. [Deutsche Post Leitcode — BWIPP wiki](https://github.com/bwipp/postscriptbarcode/wiki/Deutsche-Post-Leitcode) — Barcode Writer in Pure PostScript, 2026
2. [Leitcode (Deutsche Post, DHL) barcode symbology](https://www.activebarcode.com/barcode/leitcode/) — ActiveBarcode
3. [Leitcode Deutsche Post AG](https://www.idealsoftware.com/manuals/progman/leitcodedeutschepostag.html) — IDEAL Software Programming Manual
4. [Algorithm::CheckDigits::M10_005 — Deutsche Post Identcode/Leitcode (DE)](https://metacpan.org/pod/Algorithm::CheckDigits::M10_005) — MetaCPAN
5. [Modulo 10 check-digit calculation for barcodes](https://www.activebarcode.com/codes/checkdigit/modulo10) — ActiveBarcode
6. [Postal barcodes and how to read them](https://scanbot.io/blog/postal-barcodes-and-how-to-read-them/) — Scanbot SDK
7. [Interleaved 2 of 5](https://en.wikipedia.org/wiki/Interleaved_2_of_5) — Wikipedia
8. [Deutsche Post Leitcode — Barcode Guide](https://barcodeguide.seagullscientific.com/Content/Symbologies/Leitcode.htm) — Seagull Scientific (BarTender)

## Deployments

_No country reports mention this standard by name._
