Every simplified tax invoice in Saudi Arabia carries a QR code, and inside it is a short Base64 string that is easy to get subtly wrong. The ZATCA QR tool builds that string from the five required fields, and reads any payload back so you can check what a printed code actually says.
- TLV tags in every payload
- 5
- for the tag, 1 byte for the length
- 1 byte
- maximum UTF-8 bytes per value
- 255
The five tags
- Tag 1. Seller name, the VAT-registered supplier. Arabic is supported.
- Tag 2. The seller’s 15-digit VAT registration number.
- Tag 3. The invoice timestamp in ISO 8601, for example 2026-01-15T14:30:00Z.
- Tag 4. The invoice total including VAT.
- Tag 5. The VAT total.
Bytes, not characters
Each record is one tag byte, one length byte, then the value. The length counts UTF-8 bytes, not characters, and an Arabic seller name takes two or more bytes per character. Counting characters produces a payload that looks right and decodes wrong. The encoder measures bytes, and keeps the records in tag order.
- Five fields in
- Byte lengths measured in UTF-8
- A Base64 payload to copy
- A Base64 payload in
- Every record read in order
- Named fields back out
Decoding reports every record it reads, including unknown tags, and says plainly when a payload is truncated. Jemma is based in Riyadh and works across the IFRS, SOCPA and ZATCA frameworks, so this is a check Saudi finance teams reach for often.
The tool returns the payload, not a QR image, to avoid guessing image settings. It is an example aid: confirm field formats and the current QR requirement against the ZATCA specification before use.
Further reading
Questions
Does this produce a scannable QR code?
No. It produces the Base64 TLV payload that goes inside the QR code. A QR encoder turns that payload into the printed square.
Why does Arabic text change the length bytes?
The length is measured in UTF-8 bytes, and Arabic characters take two or more bytes each. The encoder counts bytes to keep each record valid.
What timestamp format should Tag 3 use?
ISO 8601 date and time, for example 2026-01-15T14:30:00Z. Match the format the ZATCA specification requires for your invoices.
Is my data sent anywhere?
No. Encoding and decoding run entirely in your browser.
