In short
- The Leitweg-ID routes e-invoices to the right German public authority. It is used for B2G invoices, not for B2B.
- It has three parts: a coarse address (2 to 12 digits), an optional fine address (up to 30 letters or digits) and a 2-digit check number.
- It goes in field BT-10 Buyer reference of an XRechnung, and can also serve as a Peppol ID under scheme 0204.
- You do not create it yourself. The public customer gives it to you, usually in the order.
If you supply a German public authority, its purchasing team will probably ask you to put a Leitweg-ID on your invoice. The Leitweg-ID (literally "routing ID") tells the authority's systems which department should process the invoice. Without the right one, your XRechnung may not reach the department that has to pay it.
This page explains what the Leitweg-ID is, how its format works, where it goes in the invoice and where to get it. The format facts come from the official KoSIT specification, version 2.0.2 of 28 July 2021.
B2G only: you do not need it for business customers
The Leitweg-ID belongs to public-sector invoicing (B2G). German B2B e-invoicing, mandatory to receive since 2025 and to issue from 2027 or 2028, has no routing ID requirement. For B2B invoices the buyer reference field (BT-10) can contain just a hyphen. See our Germany e-invoicing guide for the B2B rules.
Public-sector invoicing follows its own rules: the federal E-Invoicing Ordinance (ERechV) for federal authorities, in force since 27 November 2020, plus separate rules in each state. Invoices to the federal government go through the OZG-RE platform. Where both the B2B rules and the B2G rules apply, the stricter one wins.
What the Leitweg-ID does
The federal government and the states agreed on one Leitweg-ID scheme as part of running the XRechnung standard. It lets an incoming e-invoice be addressed and, if needed, forwarded to the invoice-processing system of the right administrative unit. The KoSIT specification describes the format, but not how IDs are assigned: issuing and maintaining Leitweg-IDs is the responsibility of the federal government and each state.
According to FeRD, the federal government and some states require the Leitweg-ID on e-invoices, while other states use their own identifier systems in the same field, or set no uniform rules.
The format: three parts
A Leitweg-ID has three parts, separated by hyphens:
| Part | Required | Length | Content |
|---|---|---|---|
| Coarse address (Grobadressierung) | Yes | 2 to 12 digits | State or federal code, then region, district and municipality codes |
| Fine address (Feinadressierung) | No | Up to 30 characters | Letters A to Z (not case-sensitive) and digits 0 to 9 |
| Check number (Prüfziffer) | Yes | 2 digits | Calculated over the other parts |
The full ID is between 5 and 46 characters long, hyphens included. The KoSIT example is:
04011000-1234512345-06
The coarse address
The coarse address is built from the official regional key. Its first two digits identify the state or the federal level:
| Code | Level | Code | Level |
|---|---|---|---|
| 01 | Schleswig-Holstein | 10 | Saarland |
| 02 | Hamburg | 11 | Berlin |
| 03 | Niedersachsen | 12 | Brandenburg |
| 04 | Bremen | 13 | Mecklenburg-Vorpommern |
| 05 | Nordrhein-Westfalen | 14 | Sachsen |
| 06 | Hessen | 15 | Sachsen-Anhalt |
| 07 | Rheinland-Pfalz | 16 | Thüringen |
| 08 | Baden-Württemberg | 99 | Federal government (Bund) |
| 09 | Bayern |
After that can follow a 1-digit administrative region, a 2-digit district and a 3, 4 or 7-digit municipality code. In the example, 04 is Bremen and 0 11 000 narrows the address further.
The fine address
The optional fine address identifies the unit inside the authority. Each state or the federal government decides how to use it. KoSIT recommends starting it with a letter, because a misplaced hyphen between the coarse and fine address would otherwise be harder to detect.
The check number
The last two digits are a check number calculated with the ISO/IEC 7064 Modulo 97-10 method, the same family of method used for IBANs. Software can therefore catch typing errors before the invoice is sent. KoSIT's example works like this:
- Take the coarse and fine address without hyphens:
040110001234512345. Letters in the fine address would be replaced by numbers (A = 10, B = 11 up to Z = 35). - Append
00and divide by 97: the remainder is 92. - Subtract the remainder from 98: 98 minus 92 gives
06.
To verify an ID, remove the hyphens, convert any letters and divide by 97. If the remainder is 1, the check number is valid.
Where the Leitweg-ID goes in the invoice
In an XRechnung, the Leitweg-ID goes in field BT-10 Buyer reference. FeRD adds that it can also be used for Peppol addressing in field BT-49, the buyer's electronic address.
That Peppol use is formal: on 30 September 2019, KoSIT registered the Leitweg-ID with the ISO/IEC 6523 maintenance agency, where it has the code 0204. An authority reachable on Peppol can therefore be addressed as 0204: followed by a Leitweg-ID. The ID used for Peppol does not have to be identical to the one in BT-10, so use what the authority gives you for each. Our Peppol Directory guide explains how Peppol IDs work.
Where to get the right Leitweg-ID
You do not create a Leitweg-ID. The public customer gives it to you, normally with the order or contract. If it is missing:
- Look in the purchase order, the contract and the tender documents.
- Ask your contact at the authority what to enter in BT-10. FeRD recommends exactly this when in doubt.
- Do not reuse an ID from another department of the same authority. The fine address may point to a different unit.
Check your invoice before you send it
A wrong check number or an empty BT-10 field is easy to miss by eye. Our free e-invoice validator runs the official KoSIT XRechnung rules in your browser, so you can see problems before the authority does. For the format itself, read our XRechnung guide.
This page explains a technical standard and is not legal advice. Each authority's own invoicing instructions take precedence.
Questions people ask
What is a Leitweg-ID?
It is a routing identifier that German federal, state and local authorities use so that an incoming e-invoice reaches the right invoice-processing unit. The format is agreed between the federal government and the states and specified by KoSIT.
Where do I get a Leitweg-ID?
From your public-sector customer. The Leitweg-ID is normally passed to the supplier with the specific order. If you do not have it, ask the authority what to enter in field BT-10.
Do I need a Leitweg-ID for B2B invoices in Germany?
No. The Leitweg-ID is only for invoices to public authorities. For B2B e-invoices the buyer reference field can simply contain a hyphen.
How long is a Leitweg-ID?
Between 5 and 46 characters, including the hyphens. The coarse address has 2 to 12 digits, the optional fine address up to 30 characters, and the check number always 2 digits.
Official sources
- KoSIT: Leitweg-ID Format-Spezifikation Version 2.0.2 (28 July 2021) e-rechnung.service.rlp.de
- FeRD: Datenblatt Leitweg-ID ferd-net.de
- BMF: Fragen und Antworten zur Einführung der obligatorischen E-Rechnung bundesfinanzministerium.de
- BMF letter of 15 October 2026 (B2B and B2G rules) bundesfinanzministerium.de
General information, not tax or legal advice. Check edge cases with a tax adviser.
