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.

Not tax or legal advice. This tool generates the TLV/Base64 structure for simplified-invoice QR codes per publicly documented ZATCA specifications. It does not include cryptographic invoice signing required for Phase 2 (integration phase) compliance. Confirm your specific e-invoicing obligations with ZATCA or a qualified consultant.

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

Simplified invoice, SAR 1,150 total (SAR 150 VAT)

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.

People also ask

What is the ZATCA QR code on invoices?

A TLV-encoded QR holding the seller name, VAT number, timestamp, total with VAT and VAT amount, required on simplified (B2C) e-invoices since December 2021.

Which invoices need a QR code?

Simplified tax invoices (B2C) must carry it; standard (B2B) invoices need it only from the integration phase onward.

What is Phase 2 of e-invoicing?

The integration phase, rolled out in waves since January 2023, in which invoices are cleared or reported through ZATCA's Fatoora platform in XML format with a cryptographic stamp.

Can I generate the QR code myself?

Yes for Phase 1 compliance — the TLV fields are public; Phase 2 QR codes include a signature from ZATCA-compliant software.

What is the penalty for a missing QR code?

Fines start at SAR 1,000 for a first violation and rise for repeat offences under ZATCA's e-invoicing penalty schedule.

Does the QR need Arabic?

The invoice itself must be in Arabic (other languages optional); the QR holds the seller name as entered.

Written by the Calfyo editorial teamRules sourced from the official authorities named on this page and last checked How we source and check 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.