KSeF number: format and checksum check
The KSeF number is the identifier KSeF (Poland's national e-invoicing system) gives every invoice it accepts. It is always 35 characters long.
Checked in your browser. The number is not sent anywhere.
The four segments
| Segment | Length | Meaning | Example |
|---|---|---|---|
| 1 | 10 digits | Seller's NIP (Polish tax number) | 5265877635 |
| 2 | 8 digits | Date KSeF accepted the invoice for processing (YYYYMMDD) | 20250826 |
| 3 | 12 characters 0-9 A-F | Technical part | 0100001AF629 |
| 4 | 2 characters 0-9 A-F | CRC-8 checksum | AF |
How the checksum is calculated
- Take the first 32 characters (everything before the last hyphen).
- Compute CRC-8 with polynomial
0x07and initial value0x00. - Write the result as 2 upper-case hexadecimal characters. It must equal the last segment.
The official example 5265877635-20250826-0100001AF629-AF passes this check.
The number is not inside the invoice XML. KSeF assigns it after the file is accepted, so an FA(3) file never contains its own number. Export packages list it in _metadata.json. The API definition also accepts a 36-character form for numbers issued by the earlier KSeF 1.0; this checker covers the 35-character form.
Have a ZIP of KSeF XML invoices?
Turn it into an Excel workbook and PDFs. Free up to 5 files, nothing uploaded.
Source: Numer KSeF – struktura i walidacja (KSeF documentation); KSeF API 2.0 OpenAPI definition, schema InvoiceMetadata. Read 2026-11-10.