VeriFactu Invoice QR Generator
Build the código QR VeriFactu that Spanish invoices must carry: the AEAT verification URL encoded as a QR code, with the issuer's NIF, the invoice series and number, the issue date and the total. The tool builds the URL exactly as Order HAC/1177/2024 specifies - correct parameter order, DD-MM-YYYY dates, period decimals and RFC 3986 percent-encoding - and flags the two mistakes that break most home-grown implementations before you print anything.
Your VeriFactu QR appears here
Fill in the NIF, invoice number, date and total.
The two errors that break VeriFactu QR codes
An unencoded slash in the invoice number. Spanish invoice numbering very often looks like 12345678/G33, and that slash cannot go into a URL query string as-is - it has to be written %2F. Systems that concatenate the URL with string formatting instead of a proper URL encoder produce a QR that the AEAT validator cannot parse, and the failure is silent: the code scans fine, it just resolves to the wrong thing. This tool percent-encodes every parameter and tells you when it had to.
A comma instead of a period in the amount. Spanish convention writes 241,40, but the AEAT specification requires a period as the decimal separator inside the URL. A QR built with a comma fails validation at the Agencia Tributaria. Type the amount however you like here - the tool normalises it and shows you the exact value that goes into the URL.
What the QR code contains
Nothing secret. It is an ordinary HTTPS link to the AEAT's electronic headquarters carrying four query parameters - nif, numserie, fecha and importe - in that fixed order. Anyone who scans it lands on a page where the Agencia Tributaria confirms whether that invoice was actually reported. There is no hash and no signature inside the QR itself; the verification happens on the AEAT's side by looking the invoice up.
The code must be printed between 30 × 30 mm and 40 × 40 mm at error-correction level M, positioned at the top of the invoice, with the legend VERI*FACTU - or the longer “Factura verificable en la sede electrónica de la AEAT” - printed alongside it as ordinary text.
常见问题
¿Cómo generar código QR VeriFactu factura gratis sin instalar nada?
Fill in the issuer's NIF, the invoice series and number, the issue date and the total, and the QR appears immediately with its mandatory legend underneath. It is free, needs no account, and runs entirely in your browser - the invoice data is never uploaded anywhere. Download the SVG for your invoice template so the code stays sharp when printed.
¿Qué contiene exactamente el código QR factura AEAT?
An HTTPS URL pointing at the AEAT's electronic headquarters with four parameters: nif, numserie, fecha and importe. The date goes in as DD-MM-YYYY and the amount uses a period as the decimal separator. There is no hash or signature inside the code - it simply identifies the invoice so that the Agencia Tributaria can look it up and confirm it was reported.
What is the difference between the VERI*FACTU and non-VERI*FACTU endpoints?
They are two different URLs for two different operating modes. If your billing system remits invoice records to the AEAT automatically, you are in VERI*FACTU mode and the QR points at ValidarQR. If it is a compliant system that keeps the records locally instead, the QR points at ValidarQRNoVerifactu. Pick the one that matches how your software actually operates - the customer-facing legend differs too.
How big does the VeriFactu QR code have to be on the invoice?
Between 30 × 30 mm and 40 × 40 mm, at error-correction level M per ISO/IEC 18004, positioned at the top of the invoice. Leave a clear quiet zone around it - at least 2 mm, and 6 mm is better. Download the SVG rather than the PNG if you are placing it in a print template, because a QR code scaled up from a low-resolution bitmap frequently fails to scan.
Do I still need the legend if I already have the QR code?
Yes. Royal Decree 1007/2023 requires the wording to appear on the invoice as readable text next to the code - either "VERI*FACTU" or "Factura verificable en la sede electrónica de la AEAT". It is not encoded inside the QR, so a QR code on its own does not satisfy the requirement. This tool shows the correct legend for the mode you selected so you can copy it into your template.
Should I use the production or pre-production URL?
Production (www2.agenciatributaria.gob.es) for any real invoice. The pre-production endpoint (prewww2.aeat.es) is AEAT's test environment and exists so you can check that your integration builds the URL correctly before going live. The tool warns you whenever a code is pointing at pre-production, because a test URL printed on a customer invoice is an easy mistake to make and a hard one to notice.