What is a Leitweg-ID?
The Leitweg-ID is how e-invoices reach the right German public authority. Check whether a Leitweg-ID is well-formed and its check digit is correct, then learn how the format works.
By Peppol Validator · Updated · Based on the Leitweg-ID format specification v2.0.2
This checks format and check digit only (ISO/IEC 7064, MOD 97-10). Only the invoice recipient can confirm that the Leitweg-ID was actually issued. Your input stays in your browser.
The Leitweg-ID in one paragraph
If you sell to a German federal ministry, a state agency or a city, your invoice has to carry the buyer's Leitweg-ID. The public invoice-receipt platforms use it to route the invoice to the office that ordered the goods or services. An invoice without a valid Leitweg-ID cannot be delivered and is typically rejected.
The format was agreed by the federal government and the states as part of the XRechnung standard. The states and the federal government issue the actual IDs; the format specification is maintained by KoSIT, the German coordination office for IT standards. In business-to-business invoicing the Leitweg-ID plays no role.
Leitweg-ID format
A Leitweg-ID has up to three parts separated by hyphens and is 5 to 46 characters long:
routing code-sub-address-check digit
04011000-1234512345-06
| Part | Length | Status | Content |
|---|---|---|---|
| Routing code (Grobadressierung) | 2–12 digits | Mandatory | State code (01–16, or 99 for the federal level), optionally followed by the administrative district, county and municipality codes from the official regional key. |
| Sub-address (Feinadressierung) | up to 30 characters (A–Z, 0–9) | Optional | A free-form sub-address for a department or office. Each state and the federal government use their own scheme. |
| Check digit (Prüfziffer) | 2 digits | Mandatory | Computed over the routing code and sub-address with ISO/IEC 7064 MOD 97-10. |
The routing code follows the German regional key: two digits for the state (01 Schleswig-Holstein to 16 Thuringia) or 99 for the federal level, then optionally one digit for the administrative district, two for the county and three, four or seven for the municipality. That is why federal authorities often have routing codes such as 991 or 992.
The sub-address is optional and assigned freely. It may contain letters A–Z (not case-sensitive) and digits. The specification recommends starting it with a letter: the hyphen is not part of the check-digit calculation, so a hyphen in the wrong place between routing code and sub-address would otherwise go unnoticed.
How the check digit works
The check digit uses ISO/IEC 7064 MOD 97-10, the method you may know from IBANs. The worked example from the specification:
- 1.Take the routing code04011000
- 2.Append the sub-address without the hyphen (letters: A = 10 … Z = 35)040110001234512345
- 3.Append two zeros for the check digit04011000123451234500
- 4.Take the remainder after dividing by 97… mod 97 = 92
- 5.Subtract it from 98 and write two digits98 − 92 = 06
Result: 04011000-1234512345-06. To verify an ID, remove the hyphens, convert letters, and divide the whole number by 97. A remainder of 1 means the check digit is correct. The checker above does exactly this, and when the check digit is wrong it shows which one would match the address you entered.
Where the Leitweg-ID goes in the invoice
In an XRechnung the Leitweg-ID goes into BT-10 Buyer reference. XRechnung rule BR-DE-15 makes BT-10 mandatory.
<!-- UBL --> <cbc:BuyerReference>991-12345-73</cbc:BuyerReference> <!-- CII --> <ram:ApplicableHeaderTradeAgreement> <ram:BuyerReference>991-12345-73</ram:BuyerReference> ... </ram:ApplicableHeaderTradeAgreement>
On the Peppol network, a German public buyer can also be addressed with scheme 0204. The Leitweg-ID scheme was registered in the ISO/IEC 6523 code list with this ICD value on 30 September 2019. In a UBL invoice that address is the buyer electronic address (BT-49) with schemeID="0204". The Peppol ID does not have to match the Leitweg-ID in BT-10, so use the values the recipient gives you. See Peppol in Germany for how the public portals connect to Peppol.
Common Leitweg-ID mistakes
- •Look-alike dashes and spaces: An en dash (–) copied from a PDF or email looks like a hyphen (-) but breaks the ID. The checker converts dashes and shows the cleaned-up form.
- •Purchase order number in BT-10: For public buyers BT-10 holds the Leitweg-ID, not your customer's order number. The order number belongs in BT-13.
- •Outdated Leitweg-ID: Authorities reorganise. An ID that worked two years ago may no longer route anywhere. Take the ID from the current order.
- •"Fixing" the check digit: If the check digit does not match, the error is usually in the routing code or sub-address. Ask the recipient instead of changing the check digit.
What this checker does and does not check
The Leitweg-ID checker validates characters, lengths, hyphens and the check digit against the format specification. It runs entirely in your browser. Only the recipient can confirm that an ID was actually issued.
The e-invoice validator checks UBL and CII XML files against the EN16931 and Peppol BIS Billing 3.0 Schematron rules, and an XRechnung against the German KoSIT BR-DE rules instead of Peppol BIS. So for an XRechnung, BR-DE-15 flags a missing buyer reference; it does not check whether that is a valid Leitweg-ID. The KoSIT validator page explains the official tool. The Peppol rule PEPPOL-EN16931-R003 does flag invoices with neither a buyer reference nor an order reference.
Free validator
Validate the whole e-invoice
Drop an XRechnung or any other UBL or CII XML invoice to check it against EN16931 (plus Peppol BIS Billing 3.0 for Peppol BIS invoices). No signup, results in seconds.
Drag and drop XML invoices
or click to browse · UBL and CII / Factur-X supported
No invoice?
Related guides
Leitweg-ID FAQ
What is a Leitweg-ID?
A Leitweg-ID (literally "routing ID") is the electronic invoicing address of a German public-sector body. Federal, state and municipal authorities use it to route an incoming XRechnung to the unit that must process it. Its format is defined in the Leitweg-ID format specification, which is maintained as part of the XRechnung standard by KoSIT.
Where do I get my customer's Leitweg-ID?
From the customer. The public authority normally gives you its Leitweg-ID together with the order or contract. There is no public lookup that tells you which ID to use. If it is missing, ask the contracting office before you send the invoice.
How is the Leitweg-ID check digit calculated?
With ISO/IEC 7064 MOD 97-10, the same method used for IBANs. Join the routing code and sub-address without hyphens, replace letters with numbers (A = 10 to Z = 35), append two zeros, divide by 97 and subtract the remainder from 98. Write the result as two digits with a leading zero.
Which invoice field holds the Leitweg-ID?
BT-10 Buyer reference. In UBL this is cbc:BuyerReference; in CII it is ram:BuyerReference inside ApplicableHeaderTradeAgreement. The XRechnung rule BR-DE-15 makes BT-10 mandatory.
Do I need a Leitweg-ID for invoices to German companies?
No. The Leitweg-ID only exists for public-sector buyers. When you send an XRechnung to a company, BT-10 holds whatever reference the customer asks for, such as a purchase order or cost-centre number.
If the check digit is correct, is the Leitweg-ID correct?
Not necessarily. The check digit catches typos and swapped digits, but it cannot tell whether the ID was issued or belongs to the right authority. A well-formed but wrong Leitweg-ID still sends the invoice nowhere or to the wrong office.
How does the Leitweg-ID relate to Peppol?
The Leitweg-ID scheme was registered in the ISO/IEC 6523 code list on 30 September 2019 with ICD 0204. German public buyers can therefore be addressed on Peppol with participant IDs such as 0204:991-…. The Peppol ID does not have to equal the Leitweg-ID in BT-10; use the values the recipient gives you.
Does Peppol Validator check the Leitweg-ID inside my invoice?
Partly. The invoice validator checks an XRechnung against the EN16931 rules and the German KoSIT XRechnung rules (BR-DE), without the Peppol BIS rules. Rule BR-DE-15 flags an error when the buyer reference (BT-10) is missing. The invoice validator does not check the structure or check digit of the Leitweg-ID. Only for Peppol BIS invoices does the Peppol rule PEPPOL-EN16931-R003 flag an invoice that has neither a buyer reference (BT-10) nor a purchase order reference (BT-13). Use the checker on this page to check the Leitweg-ID itself.