Czytnik Faktur KSeF e-invoice viewer in your browser

Guides · Updated:

KSeF Number Format, Example & QR Code Check (KSeF 2.0)

A Polish invoice issued in KSeF that reaches you as a PDF or a printout generally carries a QR code, with the invoice’s KSeF number underneath once the Polish e-invoicing system has assigned it. The QR code links to a Ministry of Finance page where anyone can check that the invoice is in KSeF. Together they let you check whether an invoice from a new supplier, or one showing changed bank details, is in KSeF before you pay it.

KSeF number format and 35-character example

Poland’s National e-Invoicing System (KSeF) assigns every accepted structured invoice its own system identifier, called the KSeF number (numer KSeF). According to the KSeF 2.0 API documentation, every KSeF 2.0 number has a fixed 35-character format made up of four hyphen-separated parts (NIP-YYYYMMDD-XXXXXXXXXXXX-CC). It is separate from the supplier’s own invoice number (field P_2, such as FV/2026/10/0117).

Here is the official KSeF number example from the Ministry of Finance documentation:

5265877635-20250826-0100001AF629-AF

The date inside the KSeF number is when KSeF accepted the XML file for processing, not necessarily the invoice issue date printed on it (P_1).

Numbers from the earlier, voluntary KSeF 1.0 may look different. The KSeF 2.0 API specification still accepts a 36-character KSeF 1.0 number for backward compatibility, with an extra hyphen splitting the technical part. New KSeF 2.0 numbers always follow the 35-character format above, and Czytnik Faktur checks the 35-character form only.

How the CRC-8 and NIP checksums work

The CRC-8 checksum uses polynomial 0x07 and initial value 0x00, computed over the first 32 characters (hyphens included) and written as two upper-case hex characters. It catches most typing mistakes: swap the last two characters of the technical part in the example (…AF692-AF) and the calculated checksum becomes 09, flagging the KSeF number as invalid.

A valid checksum only means the KSeF number is well formed. It does not prove that the invoice exists in KSeF. For that, use the QR code.

The first 10 digits are the seller’s NIP, which has its own modulo-11 checksum. Multiply the first nine digits by the weights 6, 5, 7, 2, 3, 4, 5, 6, 7, add the results and divide by 11. The remainder must equal the tenth digit, and a remainder of 10 means the NIP is invalid.

Where to find the KSeF number

The KSeF number is never stored inside the invoice XML file itself, because KSeF assigns it only after accepting the file. You will find it:

From 1 January 2027, Polish VAT law (art. 108g and art. 108a(3)(3)) also requires active Polish VAT taxpayers paying another active Polish VAT taxpayer for a KSeF invoice to quote the KSeF number in the bank transfer, including split-payment transfers; see Poland KSeF 2026–2027 rules.

The QR code (KOD I)

The code you will usually see is KOD I. It encodes a link of this form:

https://qr.ksef.mf.gov.pl/invoice/{seller NIP}/{issue date DD-MM-YYYY}/{file hash}

The file hash is the SHA-256 hash of the invoice XML file, encoded as Base64URL (43 characters). According to the Ministry’s documentation, the page behind the link shows a simplified view of the invoice’s basic data and whether the invoice is in KSeF. Full access, such as downloading the XML file, requires additional data.

Under Polish VAT law (art. 106gb(5)), a supplier that makes an invoice available to a foreign buyer outside KSeF must mark it with this code. If the invoice has its KSeF number, the number goes under the code. If KSeF has not assigned one yet, for example for an invoice issued offline, the label reads OFFLINE. Offline invoices that have not yet been sent to KSeF carry a second code, KOD II, labelled CERTYFIKAT, which confirms who issued the invoice.

How to check an invoice

  1. Scan the QR code with your phone.
  2. Before you open it, read the address. It should start with https://qr.ksef.mf.gov.pl/invoice/. A different or lookalike domain is a warning sign.
  3. Compare the NIP and the date in the address with the invoice.
  4. Open the page and check that KSeF shows the invoice and that the basic data match.

If the page does not find the invoice, the invoice may not be in KSeF yet, the code may have been made from a different copy of the file, or the code may be false. Ask the supplier. Whether you may pay or book the invoice is a question for your own accountant.

A code computed from an XML file only matches if the file is byte for byte the one KSeF accepted. If someone opens the XML in an editor and saves it again with different indentation, line endings or a byte order mark, the invoice reads the same but the hash changes, and the link no longer finds it.

Walk-through: checking a file in Czytnik Faktur

  1. Open the English reader and drop the XML file on “Drop the XML file here”. Keep the file name the supplier or KSeF gave it.
  2. Below the invoice number is the “KSeF number” field. If the number is in the file name, the reader shows it marked “from the file name”, with the result of the CRC-8 check. If it is not, type it in the “KSeF number of this invoice” field and click “Check the number”. A number that is not in the 35-character form, including a 36-character KSeF 1.0 number, is reported as a wrong format. That only means it is not the 35-character form, not that the number is false. If you also have the UPO (the official KSeF receipt) for the invoice, drop it together with the invoice and the reader takes the number from it.
  3. The copy icon next to the number puts it on your clipboard.
  4. In the “File check” panel, the NIP lines show whether the seller’s NIP has a valid checksum. An EU VAT number is shown but not checked.
  5. The reader computes the KOD I QR code from the bytes of the loaded file and shows it in the payment part of the invoice, with the KSeF number underneath, or “KSeF number unknown”. Under it is the note “Code computed from the loaded file. Check it before use.”
  6. Click “Check the link in KSeF”. The Ministry of Finance verification page opens in a new tab. Only then do three items leave your browser, as part of that address: the seller’s NIP, the issue date and the file hash. The invoice cannot be rebuilt from the hash. The Ministry’s server also sees your IP address, as any site you visit does.
  7. “KSeF environment” lets you switch between production, test and demo. Leave it on production for real invoices.

Czytnik Faktur is not affiliated with the Ministry of Finance. The verification page belongs to the Ministry, and the reader only builds the link to it. Its checks run in your browser and are not KSeF validation. To read the rest of the invoice in English, see How to open a Polish e-invoice from KSeF.

Sources

Guides