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.

System
Environment

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 size30 × 30 mm – 40 × 40 mm
Error correctionM
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.

Tax QR characteristics, specification version 0.5.0.
RequirementValueWhere it is set
Code standardISO/IEC 18004:2015Order HAC/1177/2024, art. 21.1
Error correctionMOrder HAC/1177/2024, art. 21.1
Printed size30 to 40 mm a sideOrder HAC/1177/2024, art. 21.1
Quiet zoneat least 2 mmAEAT 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
Open the full generator →

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.

Common questions

Can I paste this QR onto an invoice I write by hand?

You can, but it achieves nothing. If you invoice by hand you do not need a QR, and if you invoice with software, the software must create the record and the QR together. A QR added from outside points to an invoice the Tax Agency does not have, so your customer will see that it is not on record.

How big should the QR be on a printed invoice?

Between 30 and 40 millimetres a side, with a white margin of at least 2 millimetres around it. Smaller codes are hard for many phones to read, and larger ones take space for no gain. The same applies in a PDF: the generator’s SVG scales without losing sharpness, so set it to the size your template needs.

Why does the amount use a dot rather than a comma?

Because the AEAT specification says so: up to twelve whole digits and two decimals, separated by a dot and with no thousands separator. That is the data format, not the printed invoice, where you can keep writing the amount with a comma. The generator swaps a comma for a dot if you type one out of habit.

What changes in the QR if my system is not VERI*FACTU?

The address it points to: it ends in ValidarQRNoVerifactu instead of ValidarQR. The four parameters stay the same. The invoice also drops the verifiable invoice sentence and the word VERI*FACTU under the code, because the records are not sent to the Tax Agency at the moment of issue.

Keep going

Official sources for this page

Prepared by

Publisher of free tools on Spain's Verifactu and e-invoicing rules: eligibility check, QR reader, Facturae creator and timeline, all in your browser

Updated on · Editorial policy · Contact

As of 2026, rules read in the BOE and on the AEAT website on