ZATCA E-Invoice QR Code Reader

Paste the Base64 string from a Saudi e-invoice QR code to decode its TLV tags, or build a valid TLV string from the five fields for your own invoices.

Spec checked October 2026. The QR code has been mandatory on simplified (B2C) tax invoices since Phase 1 of e-invoicing began on 4 December 2021. Everything runs in your browser; nothing is uploaded. This reader gives general information about the published TLV format, not tax advice.

Scan the QR with a plain camera or scanner app and copy the text it returns. Valid input contains only Base64 characters (A-Z, a-z, 0-9, +, /, =).

What TLV Means, and What Each Tag Holds

TLV stands for Tag-Length-Value. Every piece of data in the QR code is stored as three parts: a tag number saying which field it is, a length saying how many bytes the value takes, and then the value itself in bytes. Tag 1 carries the seller name, tag 2 the 15-digit VAT registration number, tag 3 the invoice timestamp in ISO 8601 format, tag 4 the invoice total including VAT, and tag 5 the VAT total. This is Phase 1 of Saudi e-invoicing (Fatoora), and the QR code carrying these five fields has been required on simplified, business-to-consumer tax invoices since 4 December 2021. When a plain phone camera shows you a long string of random-looking characters, it is showing you this TLV data after Base64 encoding; this tool turns it back into the five readable fields.

Phase 2 integration adds four cryptographic tags on top: tag 6 is the invoice XML hash, tag 7 the ECDSA signature, tag 8 the public key, and tag 9 the ZATCA signature. They prove the invoice is genuine, but they are not human-readable data. When the reader meets them it labels them and shows the raw value with a note instead of trying to interpret it. If you are generating invoices yourself, the Build tab constructs a correct Phase 1 TLV string from your five fields: enter them, copy the Base64 output, and turn it into a QR code for the invoice.

The Phase 1 tags at a glance

Tag 1: seller name. Tag 2: VAT registration number (15 digits). Tag 3: timestamp, ISO 8601. Tag 4: invoice total including VAT. Tag 5: VAT total. All five must be present on a compliant simplified invoice.

Phase 2 tags are cryptographic

Tags 6 to 9 (invoice XML hash, ECDSA signature, public key, ZATCA signature) appear on Phase 2 integrated invoices. The reader displays them with a note; they verify authenticity, they are not fields to read.

How to use this reader

  1. On the Read tab, paste the Base64 string your scanner app returns from the invoice QR code.
  2. Decode it and read tags 1 to 5; check that the VAT number is 15 digits and the timestamp looks right.
  3. If tags 6 to 9 appear, note them as Phase 2 cryptographic fields shown as-is.
  4. To create a QR string, switch to the Build tab, enter the five fields, and copy the Base64 output.

Frequently Asked Questions

A Base64-encoded TLV string. TLV stands for Tag-Length-Value: each field is stored as a tag number, the length of the value, then the value itself in bytes. Phase 1 tags are 1 (seller name), 2 (VAT registration number), 3 (timestamp), 4 (invoice total including VAT) and 5 (VAT total). Scan a receipt with a plain camera and you only see the Base64 blob; this reader decodes it into the fields.
The QR payload is not meant to be read by humans. It is the TLV data in Base64 form, which looks like random characters. A TLV decoder (like this tool) turns it back into the five readable fields.
The Phase 2 cryptographic fields: 6 is the invoice XML hash, 7 the ECDSA signature, 8 the public key, and 9 the ZATCA signature. They appear on Phase 2 integrated invoices. This reader shows them as-is with a note, since they are cryptographic data, not readable fields.
It is a 15-digit number issued to VAT-registered businesses. Tag 2 of the QR code must contain it, and the reader flags it if it is not 15 digits.
The e-invoicing (Fatoora) Phase 1 made the QR code mandatory on simplified (B2C) tax invoices from 4 December 2021. Every printed or electronic receipt from a registered business should carry it.
Switch to the Build tab, enter the five fields (seller name, 15-digit VAT number, ISO 8601 timestamp, invoice total with VAT, VAT total), and the tool encodes them as TLV and outputs the Base64 string you put into your QR code.

Related Saudi Tools

Was this tool helpful?

Comments

Loading comments...

Check Out Other Popular Tools