KSeF invoice hash and verification link calculator
The KSeF verification link (the one inside the QR code called KOD I) contains the SHA-256 hash of the invoice XML file. This page calculates that hash and builds the link.
Read in your browser. The file is not sent anywhere.
How to use it
- Choose the invoice XML file. Pick the FA(3) XML file exactly as it was sent to or downloaded from KSeF. It is read in your browser.
- Read the hash. The page shows the SHA-256 hash of the file in Base64 (the form used in _metadata.json), in Base64URL (the form used in the link) and in hexadecimal.
- Copy the verification link. If the file holds the seller's NIP and the issue date P_1, the page builds the KOD I link for the environment you choose.
What the link is made of
| Part | Content | In the official example |
|---|---|---|
| Address | Depends on the environment: see the table below | https://qr-test.ksef.mf.gov.pl/invoice |
| Seller NIP | Element Podmiot1/DaneIdentyfikacyjne/NIP | 1111111111 |
| Issue date | Element P_1, written as DD-MM-YYYY | 01-02-2026 |
| File hash | SHA-256 of the invoice file, in Base64URL | UtQp9Gpc51y-u3xApZjIjgkpZ01js-J8KflSPW8WzIE |
The official example in full: https://qr-test.ksef.mf.gov.pl/invoice/1111111111/01-02-2026/UtQp9Gpc51y-u3xApZjIjgkpZ01js-J8KflSPW8WzIE
Base64 and Base64URL
Both write the same 32 bytes. Base64URL uses - where Base64 uses +, and _ where Base64 uses /; the hash in the official example has 43 characters and no = at the end. _metadata.json gives the hash in Base64, the link uses Base64URL.
Address by environment
| Environment | Address of the verification service |
|---|---|
| Production | https://qr.ksef.mf.gov.pl |
| Demo (pre-production) | https://qr-demo.ksef.mf.gov.pl |
| Test | https://qr-test.ksef.mf.gov.pl |
Have a ZIP of KSeF XML invoices?
Turn it into an Excel workbook and PDFs. Free up to 5 files, nothing uploaded.
Questions
Why does my link not open the invoice?
The hash is calculated from the bytes of the file. A file that was re-saved, reformatted, or given a byte order mark has a different hash from the one KSeF holds, so the link built from it does not match. Use the file as it came from KSeF.
Where do I find the hash KSeF has for an invoice?
In an export package, _metadata.json lists it for every invoice in the field invoiceHash, as SHA-256 in Base64. See the export package page.
Does this page produce KOD II, the second QR code of offline invoices?
No. KOD II is signed with the issuer's KSeF certificate key, which only the issuer holds. This page builds KOD I only.
Source: Kody weryfikujÄ…ce QR (KSeF documentation, dated 21.08.2025); KSeF API 2.0 OpenAPI definition, schema InvoiceMetadata. Read 2026-11-10.