ZATCA QR code generator
A complete simplified tax invoice on your letterhead, with the QR code built from its own totals, or just the code if your invoices come from elsewhere. Then check how ready the clinic is for phase 2.
How to use it
Enter the seller
The registered name and the 15-digit VAT number. Save once and both are there for the next invoice.
Add the services
Patient, services, quantities and prices, with or without VAT, a discount and how it was paid. VAT is worked out per line.
Print the invoice
Download PDF prints the invoice with its code. The code alone is there as PNG, SVG or text if your own system needs it.
Check it and plan phase 2
Paste any code’s text into the checker to read it back, then work through the phase 2 readiness list.
What is inside the code
Phase 1 asks for five values: the seller’s name, its VAT registration number, the time the invoice was issued, the invoice total including VAT, and the VAT total. Each is written as a tag, a length and the value in UTF-8, the five are joined, and the result is Base64-encoded. That text is what the QR code holds.
The length is counted in bytes, not letters. An Arabic seller name takes two bytes a letter, and a generator that counts characters produces a code that looks fine and reads back wrong. This one counts bytes, and the checker below proves it on your own code.
Save your design
Without saving, your clinic details, design and templates are cleared when the page reloads. Leave your email and they are kept in this browser from now on, and we will show you how they work in a Medicolize account, on every device and attached to patient files.
Read next
Saudi Arabia
Phase two clearance as the invoice is raised: QR code, VAT breakdown, insurance share and Arabic invoices, cleared rather than submitted afterwards.
Read more From the blogZATCA e-invoicing for clinics: phase 2 in practice
Phase 1 was easy: an invoice from a system instead of paper. Phase 2 connects your system to ZATCA directly, and invoices that used to pass…
Read moreOther free tools
Questions
Is this QR code valid for phase 2?
No. Phase 2, integration, needs a QR code that also carries the invoice hash and a cryptographic stamp, which only a ZATCA-onboarded invoicing system can produce. This tool covers phase 1, generation.
Which invoices need the QR code?
Simplified tax invoices, the kind given to individual patients, must carry it. Standard tax invoices between businesses may carry it too.
Can the seller name be in Arabic?
Yes, and it should match your VAT registration. The tool counts the Arabic name’s length in bytes, which is where most homemade generators go wrong.
Is the VAT number checked?
Its shape is: 15 digits, starting and ending with 3. Whether it is registered to you is something only ZATCA can confirm.
Is anything sent to a server?
No. The code is generated in your browser. If you save, the seller name and VAT number are kept in this browser so you do not retype them.
What does phase 2 change for a clinic?
Invoices are issued as XML by a system registered with ZATCA, each one is stamped and chained to the last, and simplified invoices are reported within 24 hours. The checklist below walks through what that means in practice.
Phase 2 without the project
Medicolize issues ZATCA phase 2 invoices from the visit itself: stamped, reported and attached to the patient file. Thirty minutes on your own clinic.