Verifactu QR code: generate the URL and QR for an invoice
Independent, non-governmental site
Enter the four invoice details and choose the mode: the generator builds the matching URL, validates it and draws the QR, ready to test your invoice template.
Tax QR URL
Ready for the QR
https://prewww2.aeat.es/wlpl/TIKE-CONT/ValidarQR?nif=89890001K&numserie=12345678%26G33&fecha=01-01-2024&importe=241.4
| Printed size | 30 × 30 mm – 40 × 40 mm |
| Error correction | M |
| Quiet zone | ≥ 2 mm (6 mm) |
Prepared by Radif Partners · Method · Rules read in the BOE and at the AEAT on 25 October 2026
Every invoice issued with invoicing software in Spain must carry a tax QR code under Order HAC/1177/2024 and article 6.5 of the Invoicing Regulation. The code does not hold the invoice; it holds a Spanish Tax Agency URL with four parameters: issuer tax ID, series and number, issue date and total amount. The AEAT specification, version 0.5.0, sets the rest: standard ISO/IEC 18004:2015, error correction level M, a printed size between 30 and 40 millimetres a side, a quiet zone of at least 2 millimetres and the words “QR tributario:” above it. This generator builds the URL with the correct encoding, warns when a value breaks the format and draws the QR as SVG or PNG so that designers and developers can check an invoice template. By default it uses the official AEAT example and its test environment. Generating the QR registers nothing: on a real invoice the invoicing software creates it together with the registration record, and only then can the Tax Agency website find the invoice.
How the QR URL is built
The URL has two parts. The first is fixed and depends on the system and environment: in production, https://www2.agenciatributaria.gob.es/wlpl/TIKE-CONT/ValidarQR for VERI*FACTU and https://www2.agenciatributaria.gob.es/wlpl/TIKE-CONT/ValidarQRNoVerifactu for everything else. The second carries the four parameters in this order: nif, numserie, fecha and importe. Each value is written in UTF-8 and URL-encoded, so a space, a slash or an & sign in the invoice number does not break the address. The QR specification uses the number 12345678&G33 as its example, which becomes 12345678%26G33 inside the QR.
| Requirement | Value | Where it is set |
|---|---|---|
| Code standard | ISO/IEC 18004:2015 | Order HAC/1177/2024, art. 21.1 |
| Error correction | M | Order HAC/1177/2024, art. 21.1 |
| Printed size | 30 to 40 mm a side | Order HAC/1177/2024, art. 21.1 |
| Quiet zone | at least 2 mm | AEAT specification |
| Words above | “QR tributario:” | AEAT specification |
| VERI*FACTU caption | “Factura verificable en la sede electrónica de la AEAT” or “VERI*FACTU” | Order HAC/1177/2024, art. 20.1.b |
What this generator is for
It serves three purposes. Someone designing an invoice template can place a full-size QR and check that a phone reads it before handing the template to the software. Someone programming an invoicing system can compare the URL their code produces with the one shown here and catch encoding errors, the most common fault. And someone receiving invoices can see what data the code holds before trusting it.
Change the amount and watch the URL change; the other values come from the official example:
URL encoded in the QR
URL encoded in the QR
Valid
| URL (test environment) | https://prewww2.aeat.es/wlpl/TIKE-CONT/ValidarQR?nif=89890001K&numserie=12345678%26G33&fecha=01-01-2024&importe=241.4 |
| The & in the number | %26 |
What the generator does not do
It creates no invoice record, computes no hash and sends nothing to the Tax Agency. Article 21 of Order HAC/1177/2024 sets the QR content: the matching service URL and four details of the issued invoice. The website only finds the invoice if the system generated its registration record and, in VERI*FACTU mode, sent it. A QR made separately, however perfect its format, points to an invoice the website cannot find. That is why the generator defaults to the test environment: its address starts with prewww2.aeat.es and cannot be mistaken for a real invoice. In a structured e-invoice, article 20.2 of the Order allows the URL in a field of its own instead of the QR image.
If you have an invoice and want to check its code, use the QR reader. To see the other technical element of Verifactu, the digest that chains the records, open the hash calculator. What software must do to comply is on invoicing software requirements.