Portuguese Invoice QR Code Reader (QR Fatura) – Free

This Portuguese invoice QR code reader decodes the QR printed on a fatura and lists its fields by name. Upload an image or paste the raw text. Decoding happens in your browser.

How to use the PT invoice QR tool

  1. Choose a photo or screenshot under QR code image (optional). PNG, JPEG and WebP files under 15 MiB are accepted.
  2. If you already have the decoded string, leave the file empty and paste it into QR text if no image is selected.
  3. Select Read invoice QR to decode and label the fields.
  4. Read the labeled fields in the Result box, one per line, in payload order.
  5. Select Copy to copy the list, or Example to load a sample payload.

What the QR code on a Portuguese invoice contains

Invoices and receipts produced by certified billing software in Portugal carry a QR code specified by the tax authority (Autoridade Tributária e Aduaneira). The code holds plain text: fields separated by asterisks, each written as a key, a colon and a value.

Keys are single letters, some followed by a digit. A is the issuer's NIF, B the buyer's NIF, C the buyer's country, D the document type (FT for an invoice, FS for a simplified invoice), E the status, F the date as YYYYMMDD, G the document number and H the ATCUD, the unique document code.

Worked example of a decoded payload

The sample text that the Example button loads decodes as shown below. The buyer NIF 999999990 is the generic number used when the customer is not identified.

A:123456789*B:999999990*C:PT*D:FT*E:N*F:20260131*G:FT A/12*H:ABCD1234-12*O:23.00*P:123.00

Issuer NIF: 123456789
Buyer NIF: 999999990
Buyer country: PT
Document type: FT
Status: N
Issue date: 20260131
Document number: FT A/12
ATCUD: ABCD1234-12
Total tax: 23.00
Gross total: 123.00

Field labels used by this invoice QR reader

Thirteen keys have labels: A Issuer NIF, B Buyer NIF, C Buyer country, D Document type, E Status, F Issue date, G Document number, H ATCUD, O Total tax, P Gross total, Q Hash excerpt, R Certified software number and S Additional information. Any other key is shown as Field followed by the key, for example Field I7 or Field N.

Check the totals against the tax authority's key list. There, the VAT breakdown sits in I1 to I8, with J and K for the Azores and Madeira, N is the total tax, O is the document total including tax and P is the amount withheld. The tool prints the O value under the label Total tax and the P value under Gross total. On a real invoice the line labeled Total tax is therefore the document total, and the tax total appears as Field N.

Reading from an image: limits and failure causes

When a file is selected, the pasted text is ignored. The image is drawn to a canvas, scaled down if its longer side exceeds 2048 pixels and scanned for a QR code. The decoded text is then parsed the same way as pasted text.

  • Files over 15 MiB or of another type, such as PDF or HEIC, are refused. For a PDF invoice, take a screenshot of the QR code first.
  • If no QR code is detected, the tool reports No Portuguese invoice QR payload was found. Crop closer and keep the code flat and sharp.
  • The same message appears when the text is not a list of key:value fields separated by asterisks, when it ends with an asterisk, or when no A field with a nine-digit NIF is present.
  • Values are displayed as found. NIF check digits, dates and totals are not verified.

Frequently asked questions

Is the invoice image uploaded to a server?

No. The picture is decoded on a canvas in your browser and the text is parsed locally. Neither the image nor the invoice data leaves your device.

What is the ATCUD shown in the result?

ATCUD is the unique document code printed on Portuguese invoices. It joins a validation code, which the tax authority issues for each document series, and the sequential number of the document within that series, separated by a hyphen.

Why do some lines appear as Field I7 or Field N?

Only thirteen keys have names. Other keys, such as the VAT bases and amounts in the I, J and K groups or the totals in L, M and N, are passed through with a generic label and their original value.

Does this tool confirm that an invoice is genuine?

No. It only displays what the QR code says. It does not verify the hash, the ATCUD or the issuer with the tax authority, and a QR code can be copied like any printed text.

Related tools