Back to the ZATCA CheckerCode structure

What data is inside an e-invoice QR code?

The square code at the bottom of a simplified tax invoice is neither a random image nor a link. It is compressed text holding five ordered fields, written in a format called TLV and then converted to Base64 so the code can carry it.

ZATCA Checker

A plain explanation of the TLV structure in Saudi e-invoice QR codes: the five tags, what each field means, and how values are read after decoding.

Check your invoice now

What is TLV?

TLV stands for Tag, Length, Value: the tag number, then the length of the value, then the value itself encoded in UTF-8. This structure lets a reader know exactly where each field ends and the next begins, even when text lengths differ.

The five tags

TagContent
1Seller name
2VAT number (15 digits)
3Invoice date and time, ISO 8601
4Invoice total including VAT
5VAT amount

Once those fields are laid out in this encoding, the whole result is converted to Base64, and that string is what gets drawn inside the code. That is why decoding the code gives you a Base64 string, and decoding that string gives you the fields.

Why a code sometimes fails even though it is there

  • Missing field: the code is drawn but one tag is absent, so the check cannot complete.
  • Wrong format: the VAT number is shorter or longer than 15 digits.
  • Timestamp with milliseconds: the expected format has none, and their presence breaks the pattern.
  • Inconsistent VAT maths: the VAT amount does not equal 15% of the pre-VAT total.

The tool does not just say "invalid code". It shows you which field caused the result, explains why, and suggests what you can do.

See the contents of your own code

The ZATCA Checker shows you the decoded content field by field. Nothing is hidden: you see exactly what a scanner sees.

Frequently asked questions

Does the code contain buyer details?

No. On a simplified tax invoice the payload is limited to seller data, date and amounts — no buyer name or buyer information.

Can the code be faked?

Technically, a code can be generated with any content. That is why the tool never treats the presence of a code as evidence beyond its structural completeness, and never verifies seller identity.

E-invoicing guide