KSeF QR code: read or build the verification link

Paste the link read from a QR code or load the invoice XML file. The tool splits the link into its parts, or computes the SHA-256 hash and draws CODE I, without uploading the file.

What do you have?

Verification link

Well-formed

Open it to see the invoice in KSeF; the ministry page shows whether the file matches.

Environmenttest
Seller tax ID1111111111
Issue date20 October 2026
SHA-256 hashbUK2MV3bs7nm…

CODE II (CERTIFICATE) for offline invoices is signed with the KSeF offline certificate key: your invoicing software does that, not this page.

Prepared by Radif Partners · Method · VAT Act, regulations and ministry notices checked on 25 October 2026

The QR code on a KSeF invoice is a link in graphic form that lets anyone check the invoice in the system without logging in. The duty comes from Article 106gb(5) of the Polish VAT Act: you add the code when you hand the invoice to a buyer outside KSeF, for example a consumer or a foreign business, and when you use the invoice outside the system, such as printing it for warehouse papers. The first code, called CODE I, holds the verification server address, the seller's tax ID, the issue date as day, month and year, and the SHA-256 hash of the XML file encoded in Base64URL. The KSeF number is printed under the code, or the word OFFLINE for an offline invoice. An offline invoice handed over outside the system also carries a second code, CODE II labelled CERTIFICATE, signed with the offline certificate, which confirms who issued it. The tool below reads the link from a code or builds it from a file, exactly as the KSeF 2.0 API documentation specifies.

How a CODE I link is built

The code I link has a fixed layout, described in the KSeF 2.0 API documentation and on the ministry page on verification codes:

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

PartContentsExample
addressverification server: production, test or demoqr.ksef.mf.gov.pl
NIPseller’s tax ID, 10 digits1111111111
dateissue date from field P_120-10-2026
hashSHA-256 of the XML file, Base64URL, 43 charactersbUK2MV3b…

The example in the tool is a real invoice from the test environment, so you can open it and see the server’s answer.

How many codes and which label

The number of codes depends on two things: the issuing mode and how the invoice reaches the buyer. This follows from Article 106gb(5) and Article 106nda(6) of the VAT Act. Check your case:

QR codes on the invoice

QR codes on the invoice

1

Label under code IKSeF number
Code standardISO/IEC 18004:2024
Check how many QR codes you need →

CODE II contains certificate data and a signature, so it is produced by invoicing software holding the offline certificate described on the page on KSeF certificates. This tool builds only CODE I, because code II needs your private key, which must never be typed into any website.

How to check an invoice from its code

Scan the code with a phone and open the link. The ministry’s verification page shows whether an invoice with that hash exists in KSeF. If you have the XML file you can also compute the hash here and compare it with the one in the code: they must match character for character. Open the invoice itself in the FA(3) reader, and check the number under the code with the number validator. The rules for invoices issued without a connection are on the offline mode page.

The QR code on a printout and in a PDF

The code goes on the invoice visualisation, a printout or a PDF file, where it can easily be scanned with a phone. The KSeF number or the word OFFLINE is printed under the code, so that someone without a scanner can read the number. The code must be large enough for a camera to recognise; a code that is too small or blurred on a thermal printer is a common problem in warehouses.

Common questions

What does the SHA-256 hash in the invoice QR code check?

The hash is a fingerprint of the whole XML file. Change one digit in an amount or one letter in a name and the hash comes out different. When you open the link from the code, the system compares the hash with the file it holds. A match means the invoice in KSeF is exactly the one you have.

Does an invoice a business receives in KSeF also need a QR code?

No, as long as it stays in the system. A buyer with a Polish tax ID receives the invoice in KSeF and keeps it there. The code is needed when the invoice leaves the system: on a printout shipped with goods, in an email to a foreign customer, or when the taxpayer uses it outside KSeF.

How does a code on a test invoice differ from a production one?

By the server address. Production invoices link to qr.ksef.mf.gov.pl, practice environments to qr-test.ksef.mf.gov.pl or qr-demo.ksef.mf.gov.pl. The tool recognises the environment from the address and warns when a link comes from testing, because such an invoice has no tax effect at all.

Which certificate does the second QR code on an offline invoice need?

An offline-type KSeF certificate, which the issuer downloads from the system in the certificates module. It is used only to sign code II, not to log in. Without it you cannot issue a correct offline invoice to a buyer outside the system, so it is worth getting one in advance, before the first failure.

Keep going

Official sources for this page

Prepared by

Publisher of free KSeF tools: obligation and deadline check, FA(3) invoice reader, PLN 10,000 limit counter and offline modes, all in your browser

Updated on · Editorial policy · Contact

As of 2026, laws and ministry notices checked on