Polish KSeF ID Generator (e-Invoice)
Generate and format valid Polish e-Invoice KSeF identifiers (Krajowy System e-Faktur).
Waiting for generation...
About Polish KSeF Identifiers (e-Invoicing)
KSeF (Krajowy System e-Faktur) is Poland's centralized e-invoicing platform administered by the Ministry of Finance (Ministerstwo Finansów) and KAS.
The KSeF identifier is a 32-character alphanumeric code structured as `NIP(10)-Date(8)-Hex1(6)-Hex2(6)-Checksum(2)`. The embedded NIP is rigorously validated via Modulo 11 with weights `6, 5, 7, 2, 3, 4, 5, 6, 7`.
Anatomy & Structure of Polish KSeF Number
The KSeF identifier consists of 32 structured alphanumeric characters:
| Position | Field | Length | Meaning & Rule | Example |
|---|---|---|---|---|
| 1 to 10 | Issuer NIP | 10 digits | Tax Identification Number of the issuer verified via Modulo 11 | 1234567890 |
| 11 to 18 | Issue Date | 8 digits | Invoice date formatted as YYYYMMDD | 20260827 |
| 19 to 30 | Hex Technical ID | 12 hex | Two 6-character hexadecimal technical blocks | 1A2B3C4D5E6F |
| 31 to 32 | Hex Checksum | 2 hex | Internal hexadecimal check bytes of the KSeF system | A1 |
KSeF Assembly & Validation Algorithm
KSeF validation inspects the mathematical integrity of the 4 composite elements:
KSeF = NIP(10) + YYYYMMDD(8) + Hex(12) + Checksum(2)
- 1. Remove hyphens and validate the 32-character alphanumeric length.
- 2. Validate the embedded NIP in the first 10 digits using Modulo 11.
- 3. Validate the issue date in digits 11 to 18 ensuring valid day, month, and year.
- 4. Validate that the last 14 characters contain only hexadecimal digits (0-9, A-F).