ZATCA QR Code Generator & Decoder
Generate a ZATCA-compliant QR code for a Saudi simplified tax invoice (Phase 1 TLV Base64) or decode an existing one — free, instant, runs in your browser.
| Base64 TLV string | — |
|---|
In short
A ZATCA simplified tax invoice QR code encodes five TLV fields — seller name, VAT number, timestamp, invoice total and VAT amount — as a Base64 string. Each field is a one-byte tag, a one-byte length and the UTF-8 value.
Who this is for: Saudi businesses and developers generating or checking the QR code on a ZATCA simplified tax invoice.
What is a ZATCA QR code?
Since Phase 1 of Saudi Arabia's e-invoicing (Fatoora) mandate, every simplified tax invoice (typically B2C, point-of-sale) must carry a QR code encoding five fields in TLV (Tag-Length-Value) format, then Base64-encoded:
- Tag 1: Seller name
- Tag 2: Seller VAT registration number
- Tag 3: Invoice timestamp (ISO 8601)
- Tag 4: Invoice total (with VAT)
- Tag 5: VAT total
Each field is encoded as: 1 byte for the tag number, 1 byte for the UTF-8 byte-length of the value, then the value itself. All five fields are concatenated and the result is Base64-encoded to produce the string embedded in the QR code.
This tool builds that TLV structure in your browser and renders it as a scannable QR code — and can also decode an existing ZATCA QR string back into its five fields.
Assumptions
- The QR encodes the five mandatory TLV tags (1–5) only; cryptographic tags 6–9 for standard invoices are not generated.
- Timestamp must be entered in ISO 8601 format.
- Everything runs in your browser; nothing is sent to ZATCA.
Worked example
Seller: Al Farazm Trading Co. · VAT: 311111111100003 · Total: SAR 1,150.00 · VAT: SAR 150.00
The tool builds the 5-field TLV byte string, Base64-encodes it, and renders it as a QR code your invoicing system or till receipt can embed.
Frequently asked questions
Is this the same as a full Phase 2 e-invoice?
No. This covers the simplified-invoice QR structure (Phase 1). Phase 2 (integration phase) requires invoices to be cryptographically signed and cleared/reported through ZATCA's platform — this tool does not generate a cryptographic stamp and is for simplified/offline testing and learning purposes.
Can I use this QR code on real invoices?
For businesses in scope of Phase 2 integration, you must generate QR codes through ZATCA-compliant invoicing software that includes the required cryptographic stamp — this free tool is not a substitute for that. It's useful for understanding the format, testing, or for very small simplified-invoice use cases where Phase 2 does not yet apply to you.
Does my data get uploaded anywhere?
No — everything is generated and decoded in your browser. Nothing is sent to any server.
Is the QR code enough for Phase 2 (integration) compliance?
No. Phase 2 standard invoices require the additional cryptographic tags and clearance through ZATCA's platform; this tool covers the five basic tags used on simplified invoices.
Can I decode a QR from a supplier's invoice?
Yes — paste the Base64 string to see the seller, VAT number, timestamp and totals encoded in it.
Related calculators
See all Saudi Arabia calculators → · All free online calculators
Found an error? Report it — tell us the inputs, the result you got, what you expected and the rule or source. Confirmed corrections are published within a week.
Ready to build your next digital solution?
Send the brief and you get a scoped response with approach, milestones and a fixed price range. Not a sales call.
A 30-minute call with the engineer who would run your project
Within 2 business daysA written scope: approach, module breakdown, milestones, fixed price range
Within 5 business daysYou decide. No retainer, no obligation, and the scope document is yours to keep either way
Your timelineSend your brief
Three fields to start. Add project details if you have them.
