Skip to content

ZATCA QR Code Generator for Saudi E-Invoices

Create a ZATCA-compliant TLV Base64 QR code in seconds, or decode an existing one. Free, instant and processed entirely in your browser, so your invoice data never leaves your device.

  • • Seller name is required.
  • • VAT number must be 15 digits, starting and ending with 3.
  • • Timestamp is required.
  • • Invoice total must be a number, e.g. 1150.00.
  • • VAT amount must be a number, e.g. 150.00.

What is a ZATCA QR code?

Saudi Arabia's Zakat, Tax and Customs Authority (ZATCA) requires electronic invoices to carry a QR code as part of the Fatoora e-invoicing regulations. The code packs the most important invoice details into a machine-readable format so that tax authorities and customers can verify an invoice by scanning it with the ZATCA mobile app or any QR reader.

The data inside is not plain text. It is encoded as TLV (Tag-Length-Value) and then converted to Base64. That is why a ZATCA QR code scanned with a normal reader shows a long string of letters and numbers instead of readable invoice details.

What data goes into the QR code?

A Phase 1 ZATCA QR code contains five fields, in this order:

TagFieldExampleFormat
1Seller nameBobs RecordsUTF-8, Arabic supported
2VAT registration number31012239350000315 digits, starts and ends with 3
3Invoice timestamp2022-04-25T15:30:00ZISO 8601 date and time
4Invoice total (with VAT)1000.00Decimal number
5VAT amount150.00Decimal number

How to generate a ZATCA QR code

  1. 1Enter your seller name exactly as it appears on your VAT registration.
  2. 2Add your 15-digit VAT registration number (it starts and ends with 3).
  3. 3Set the invoice date and time, then enter the total including VAT and the VAT amount.
  4. 4The tool builds the TLV bytes, encodes them as Base64 and renders the QR code instantly.
  5. 5Download the QR as PNG or SVG, or copy the Base64 string into your invoice template.

How TLV encoding works

Each field becomes three parts: a tag byte identifying the field, a length byte giving the size of the value in bytes, and the value itself as UTF-8. For the seller name "Bobs Records" (12 bytes) the bytes start with 01 0C followed by the 12 bytes of the text. All five fields are joined in order, and the full byte array is Base64 encoded to produce the final QR content.

Because the length is stored in a single byte, no individual value can exceed 255 bytes. This tool checks that for you and warns you before generating an invalid code.

Phase 1 vs Phase 2 ZATCA QR codes

Phase 1: Generation

Five fields (tags 1–5). Invoices are generated and stored electronically, with a QR code on simplified invoices. This is what this tool produces.

Phase 2: Integration

Adds tags 6–9: invoice hash, digital signature, public key and certificate stamp signature. Invoices are cleared or reported to ZATCA, and the QR is generated by your certified e-invoicing system.

Always confirm your obligations and wave dates on the official ZATCA website. This tool is for convenience and testing and is not tax or legal advice.

ZATCA QR code FAQs

What is a ZATCA QR code?

A ZATCA QR code is a QR code printed on Saudi e-invoices that carries key invoice data in a standard format. It is required by the Zakat, Tax and Customs Authority (ZATCA) as part of the Fatoora e-invoicing regulations so that invoices can be checked quickly by authorities and customers.

What is TLV and why is the QR Base64 encoded?

TLV stands for Tag, Length, Value. Each field is written as one byte for the tag, one byte for the length, then the value as UTF-8 bytes. All fields are joined together, and the result is encoded as Base64 so it can be stored in a QR code as plain text.

What fields does a Phase 1 ZATCA QR code contain?

Five fields: seller name, VAT registration number, invoice timestamp, invoice total including VAT, and VAT amount. They are tags 1 to 5.

Is this tool valid for Phase 2 (integration phase)?

No. Phase 2 QR codes add tags 6 to 9 (invoice hash, digital signature, public key and, for simplified invoices, the certificate stamp signature). These must be produced by your e-invoicing solution using your ZATCA-issued cryptographic stamp, so they cannot be generated by a simple online form. This tool generates Phase 1 QR codes and can decode both Phase 1 and Phase 2 QR strings.

Which invoices need a ZATCA QR code?

Simplified tax invoices (B2C) and their credit and debit notes must carry a QR code. Check the current ZATCA e-invoicing rules for your invoice types and your Phase 2 wave, because requirements change over time.

Is my invoice data sent to a server?

No. Everything runs locally in your browser. Seller details, VAT numbers and amounts are never uploaded or stored.

Can I use Arabic in the seller name?

Yes. The seller name is encoded as UTF-8, so Arabic names work. Note that the length byte counts bytes, not characters, and Arabic characters use two bytes each, so the name is limited to about 127 Arabic characters.

Need full ZATCA e-invoicing built into your system?

DEVNTOM Solutions builds custom invoicing, ERP and web platforms for businesses in Saudi Arabia and the wider region.

Talk to our team