Tools

๐ŸŒ ๐Ÿ‡ธ๐Ÿ‡ฆ ZATCA FATOORA ยท ๐Ÿ‡ต๐Ÿ‡น ATCUD

E-invoice QR code decoder: ZATCA and ATCUD

Read what's inside the QR code printed on an invoice. Saudi ZATCA codes (Base64 TLV, Phase 1 and Phase 2) show seller name, VAT number, timestamp, total and VAT, plus the cryptographic stamp. Portuguese codes show NIF, ATCUD, document type, VAT bases and totals. Paste the text, drop a photo or scan with your camera โ€” all on your device.

  • ZATCA Phase 1
  • ZATCA Phase 2
  • TLV Base64
  • PT ATCUD
  • Photo / screenshot
  • Camera

Drop a photo or screenshot of the QR code

PNG or JPG of the invoice, or a .txt with the QR content โ€” or paste it below

  • ๐Ÿ”’ Files never leave your device
  • โœ“ 100% free, no sign-up
  • โฌ‡ Real PDF download
  • โšก Works offline

How to use it

  1. 1
    Get the QR content

    Paste the scanned text, drop a photo or screenshot of the invoice, or use your camera.

  2. 2
    Decode

    The fields are decoded instantly and checked (VAT number format, date, implied VAT rate, phase).

  3. 3
    Save or verify

    Download the decoded data as PDF or Excel. For official confirmation use the tax authority's verifier.

What is inside a ZATCA QR code

Since 4 December 2021 every tax invoice and simplified tax invoice in Saudi Arabia must carry a QR code defined by the Zakat, Tax and Customs Authority (ZATCA). The code contains a Base64-encoded TLV (tag-length-value) structure:

TagFieldPhase
1Seller's name โ€” ุงุณู… ุงู„ุจุงุฆุน1 and 2
2VAT registration number (15 digits) โ€” ุงู„ุฑู‚ู… ุงู„ุถุฑูŠุจูŠ1 and 2
3Invoice date and time (ISO 8601)1 and 2
4Invoice total including VAT1 and 2
5VAT total1 and 2
6Hash of the XML invoice2
7ECDSA signature2
8ECDSA public key2
9ZATCA stamp signature (simplified invoices)2

A normal QR scanner app only shows the unreadable Base64 string. This decoder unpacks the tags, shows them in English and Arabic, and runs plausibility checks: is the VAT number 15 digits starting and ending with 3, is the timestamp valid, does VAT รท (total โˆ’ VAT) give the standard 15%?

Portuguese invoice QR code (ATCUD)

In Portugal, invoices issued by certified software must show a QR code (Portaria n.ยบ 195/2020) and the ATCUD unique document code. The QR content is a list of fields separated by asterisks, for example A:123456789*B:999999990*C:PT*D:FS*โ€ฆ*H:CDF7T5HD-12345*โ€ฆ*O:0.80. The decoder translates each field: issuer and buyer NIF, document type (FT, FS, FR, NCโ€ฆ), status, date, unique identification, ATCUD, VAT bases and amounts per rate and region (mainland, Azores, Madeira), stamp duty, withholding, total and the software certificate number.

Decoding is not verification

Anyone can create a QR code with these fields. Decoding shows you what the code claims; it does not prove the invoice was reported. To verify officially:

  • Saudi Arabia: use the ZATCA verification service or app (scan the QR) or check the VAT number on the ZATCA website. Phase 2 codes also carry a cryptographic stamp that ZATCA-integrated software can validate.
  • Portugal: check the invoice in e-Fatura on the Portal das Finanรงas with the buyer's NIF.

Privacy

Photos are analysed in your browser (with the built-in barcode detector or the open-source jsQR library). Nothing is uploaded, and the camera stream never leaves your device.

Frequently asked questions

How do I decode a ZATCA QR code?
Paste the QR text (it looks like a long Base64 string) or drop a photo of the invoice on this page. The seller name, VAT number, date, total and VAT appear instantly.
What is the difference between Phase 1 and Phase 2 QR codes?
Phase 1 (generation) QR codes contain 5 fields. Phase 2 (integration) QR codes add the invoice hash, the ECDSA signature and public key, and for simplified invoices ZATCA's stamp signature.
Does this verify the invoice with ZATCA?
No. It decodes and checks the content of the QR code. Use the official ZATCA verification to confirm an invoice.
Can I scan the QR code with my phone camera?
Yes. Choose Scan with camera; the video is analysed on your phone only.
Does it read Portuguese invoice QR codes?
Yes, the ATCUD QR format of Portaria 195/2020 is decoded field by field.

Updated: