How the ZATCA QR code works
The QR doesn't hold readable text. Each field is stored as tag, length, value bytes (TLV), the records are joined, and the whole thing is Base64-encoded. Phase 1 uses tags 1–5. Phase 2 adds tags 6–9, which come from signing the invoice.
Full explanation with examples: ZATCA QR code explained: TLV, Base64 and the 9 tags. Building it in code: How to generate a ZATCA QR code in Node.js.
FAQ
Can I use this QR on real invoices?
For Phase 1 (simplified invoices with the five basic fields) the payload format is the same. In Phase 2 the QR must come from your e-invoicing solution after the invoice is signed, because it includes the invoice hash and cryptographic signature. Use this tool to learn the format and to test or debug QR codes.
Is my data sent anywhere?
No. Encoding, decoding and the QR image are all done in your browser. Nothing is uploaded.
Why does my scanner show strange characters?
A ZATCA QR contains binary TLV data encoded as Base64, not plain text. A normal scanner shows the Base64 string; paste it into the decoder above to read the fields.
Last checked against the ZATCA Phase 1 QR format on 27 November 2026. This tool is for learning and testing; confirm compliance requirements with ZATCA or your e-invoicing provider.