A QR code generator turns a link into a square code that a phone camera opens, and the kind worth printing is a static one: it holds your link itself, so it never expires, needs no account and works for as long as your page does. The generator below adds UTM tags so scans show in Google Analytics 4, draws the code at the error correction level and in the colours you choose, warns when the contrast is too low, and suggests the smallest size to print it for the distance people will scan from.
- A static code never expires. The link is stored in the pattern, and the phone reads it without contacting anyone. It stops working only if the page or the domain behind it goes.
- A “dynamic” code is a redirect you rent. It holds the generator’s own short address, which forwards scans to your page for as long as the provider keeps it running.
- UTM tags make the code bigger. Our example page is 39 characters and a 29 × 29 code; tagged with source, medium and campaign it becomes 92 characters and 41 × 41 modules.
- Leave 4 modules of blank space on every side, and print dark on light. DENSO WAVE, which invented the QR code, says that margin is required, and advises black on white.
- DENSO WAVE publishes no print size for phone cameras. If a code reads from about 10 times its width, the tagged example needs 5.9 cm on a flyer held at 30 cm. Change that assumption once your tests say otherwise.
QR code generator with UTM tags, contrast check and print size
Paste the page the code should open, fill in the three UTM tags and pick where people will scan it. The generator shows the final link, the code and its module count, the GA4 channel the scans will land in and the smallest width to print. Pick an error correction level and colours, then download the code as SVG, which stays sharp at any size. The example is our own contact page, tagged for a flyer. Nothing you type leaves your browser.
QR code generator: a static code with UTM tags, a contrast check and the print size
Our example: Adnova’s contact page, tagged for a flyer. Replace them with your own page and tags.
A page on your own domain, with https://. Then you can change what it shows later without reprinting the code.
UTM tags (optional, so scans show in GA4)
The distances are our examples. Picking one also suggests a utm_source.
A print-trade rule of thumb, not a standard: 10 means a short link’s code reads from 10 times its width. Change it if your own tests say otherwise.
M is the level DENSO WAVE says is chosen most often. Higher levels survive dirt and damage but add modules.
The blank margin around the code. QR Code requires 4 modules on every side, DENSO WAVE says.
Your QR code
- QR code
- 41 × 41
- modules a side, version 6, level M
- Link length
- 92
- characters; 29 × 29 modules without the tags
- Print it at least
- 5.9 cm
- wide with the quiet zone: modules of 1.2 mm, read from 30 cm
- GA4 default channel
- Unassigned
- session source / medium: flyer / qr
GA4’s default channel group will show these scans as Unassigned: no default rule matches medium “qr”. Traffic acquisition still shows flyer / qr, and a custom channel group with a channel for medium exactly matching “qr” gives scans their own line.
This is our example page: put your own page in before you print.
How this works
The tags are added to your page’s URL as utm_source, utm_medium and utm_campaign, the three parameters Google says to always set, and anything that isn’t a plain letter or digit is encoded. GA4 reads them when the page loads. The code holds the link itself, so it never expires: a phone decodes it without asking any other server.
The code is drawn in your browser at the error correction level you pick: L, M, Q and H restore about 7, 15, 25 and 30% of the code, says DENSO WAVE, which invented the QR code. A longer link needs a higher version: version 1 is 21 × 21 modules and each version adds 4 a side.
Print size: DENSO WAVE publishes no scanning distance for phone cameras and says reading depends on the camera, so the helper runs on an assumption you can change. We take the print-trade rule of thumb that a code reads from about 10 times its width, apply it to a short link’s code of 25 × 25 modules, and keep the module size fixed: each module is the distance ÷ (ratio × 25). A denser code therefore prints bigger. The size shown includes the quiet zone.
Contrast uses the luminance formula from the web’s accessibility guidelines (WCAG 2.2) as a proxy only: we flag under 4.5:1, and colours that look alike in red light, because DENSO WAVE says scanners use red light.
DENSO WAVE (error correction, versions, quiet zone, module size, FAQ) and Google Analytics Help, checked 2 November 2026. QR Code is a registered trademark of DENSO WAVE INCORPORATED.
Static vs dynamic QR codes: why some stop working
A QR code stores data in a pattern of dark and light squares called modules. When that data is your link, the phone decodes the link straight from the pattern and offers to open it. No server is asked whether the code is still valid, so there is nothing that can expire. That is a static code, and any generator that encodes your URL directly, this one included, makes one.
Many generators also sell “dynamic” codes. The code then holds a short address on the generator’s own domain. A scan opens that address, the generator’s server looks up where you want people to go, and redirects them there. That redirect lets you change the destination after printing and count scans. It is also why the code depends on the account: if the plan or free trial ends, the provider decides what the address does next, and every printed code leads somewhere you don’t control. And since phone cameras show the link before opening it, people see the provider’s address, not yours.
| Static code (your link) | Dynamic code (a redirect) | |
|---|---|---|
| What the code holds | Your page’s full URL | The provider’s short address |
| When it expires | Never | When the provider stops redirecting it |
| Changing where it goes | Change the page, or redirect it on your own site | In the provider’s dashboard |
| Scan figures | Visits in GA4, through UTM tags | The provider’s scan count |
| What the camera shows | Your domain | The provider’s domain |
The best of both: a short address on your own domain
You can have an editable code without renting one. Print a short address on your own domain, such as example.ae/m, and have your website redirect it to the tagged page. The code stays small (those 20 characters make a 25 × 25 code), you can change the destination at any time, and nobody else can switch it off. Use a temporary (302) redirect for a destination you expect to change, because the HTTP standard lets browsers cache a permanent (301) one. Google warns that redirects can strip UTM parameters, so put the tags in the redirect’s destination and check that a test scan arrives in GA4 with them.
UTM tags: make scans show in GA4
Google says to always set three tags: utm_source, utm_medium and utm_campaign. It adds that visits from untagged links, and from offline documents, show as (direct) / (none), mixed in with everyone who typed your address. Tag every printed code, and give each placement its own source:
- utm_source: where the code is printed, such as menu, flyer, packaging, poster or billboard (one of Google’s own examples).
- utm_medium: qr on every printed code, so all of them group together.
- utm_campaign: the offer or season, such as dsf_2026. Add utm_content to tell versions apart, such as two flyer designs or two branches.
- Lower case, no spaces, no Arabic. Values are case sensitive in reports, spaces turn into + in the link, and each Arabic letter takes 6 characters, which makes the code denser.
One result surprises people: GA4’s default channel group has no rule for a medium such as qr, so these visits show as Unassigned. The tags still work, and Traffic acquisition lists them by session source / medium as flyer / qr, with the campaign. To give printed codes their own channel, create a custom channel group in Admin, under Data display, Channel groups, with a channel whose medium exactly matches qr. Google says custom groups apply to past data too, and a standard property can have two. Our UTM builder for GA4 explains the default channel rules.
Worked example: one flyer code, five placements
The generator opens on our contact page with utm_source=flyer, utm_medium=qr and utm_campaign=dsf_2026, at error correction level M with a 4-module quiet zone, black on white. The tags take the link from 39 characters to 92, and the code from version 3 (29 × 29 modules) to version 6 (41 × 41). Here is what the same page becomes with other choices:
| Link | Characters | Code at level M |
|---|---|---|
| The page alone | 39 | 29 × 29 |
| With the three tags | 92 | 41 × 41 |
| The same, at levels L, Q and H | 92 | 37, 49 and 53 modules a side |
| With an Arabic campaign name, مهرجان_دبي_للتسوق | 176 | 53 × 53 |
| A short address on your own domain, https://example.ae/m | 20 | 25 × 25 |
Then the print size. Each placement suggests its own source, which changes the link by a few characters, but the code stays 41 × 41 in every row. Under our assumption a module is the scanning distance divided by 250, and the widths include the quiet zone:
| Where it’s scanned | Distance (our example) | utm_source | Module | Width, tagged (41 × 41) | Width, untagged (29 × 29) |
|---|---|---|---|---|---|
| Flyer or packaging in the hand | 30 cm | flyer | 1.2 mm | 5.9 cm | 4.4 cm |
| Menu or table card | 40 cm | menu | 1.6 mm | 7.8 cm | 5.9 cm |
| Poster or shop window | 1.5 m | poster | 6 mm | 29.4 cm | 22.2 cm |
| Roll-up or exhibition stand | 2 m | rollup | 8 mm | 39.2 cm | 29.6 cm |
| Billboard or hoarding | 5 m | billboard | 2 cm | 98 cm | 74 cm |
At the same module size the tagged code needs about a third more width: 49 modules against 37, quiet zone included. On a flyer that price of tracking is usually worth paying. On a small sticker or a crowded menu card, a short address on your own domain keeps the tags and a small code.
Error correction, quiet zone and colours
DENSO WAVE publishes four error correction levels: L restores about 7% of the code, M 15%, Q 25% and H 30%. It says M is the level chosen most often, that Q or H suit places where codes get dirty, and that a higher level makes the code bigger. For a clean flyer, M is enough. For menus that get wiped, packaging that gets scuffed or posters outdoors, Q is worth the extra modules.
- Quiet zone. QR Code requires a blank margin 4 modules wide on all sides. DENSO WAVE warns that text or pictures placed around the code take that margin away and can stop it reading.
- Colours. Dedicated scanners use red light, so DENSO WAVE says a red code on white, or blue on green, can’t be read; its advice is black on white. The generator flags contrast under 4.5:1 (the web accessibility guidelines’ level for text, used only as a rough proxy), light codes on dark backgrounds, and colours that look alike in red light.
- Logos and decoration. A logo over the middle relies on error correction to rebuild the hidden modules, and DENSO WAVE warns that an illustration or design laid over a code can deform it. If you add one, use level H, keep it small and test it.
- File format. Enlarging or shrinking a code in an image editor distorts its modules, DENSO WAVE notes. Download the SVG and scale the vector instead.
- Clear or shiny surfaces. A code printed on transparent film reflects too little light. DENSO WAVE suggests printing a white background behind it, or using a label.
How phones open QR codes, and testing before you print
On an iPhone, Apple’s help says to open the Camera app, or the Code Scanner in Control Center, hold the phone so the code appears, then tap the link. On Android, Google’s camera apps show a banner or link to tap; on a Pixel, Camera scan suggestions must be on in the camera’s settings, and Google Lens, which sits in the Chrome search bar, scans codes too. Neither opens anything until the person taps, so the link they see should look like yours.
Because reading depends so much on the camera, no generator can promise a size. Test instead:
- Print a proof at the final size, on the final paper or material.
- Scan it with an iPhone and an Android phone, an older one too if you can, from the real distance and in the real light, watching for glare on laminated surfaces.
- Check that the page loads quickly on mobile data and reads well on a phone.
- The next day, find the visit in Traffic acquisition under the right session source / medium.
- Keep the page and the domain live for as long as the print is in circulation.
QR codes you don’t generate yourself: Dubai property ads and Saudi e-invoices
Some QR codes come from a regulator, and no generator can stand in for them. In Dubai, property ads carry the QR code Dubai Land Department issues with each Trakheesi advertising permit, which buyers scan to check the ad is genuine and valid; see our guide to the real estate advertising permit in Dubai. In Saudi Arabia, ZATCA requires a QR code on simplified tax invoices, made by the seller’s compliant e-invoicing system with nine data fields in phase 2, while for tax invoices between businesses ZATCA generates the code’s content when it clears the invoice. Our ZATCA e-invoicing guide explains who must comply. Use those codes exactly as issued.
QR codes rarely work alone. For a code that opens a WhatsApp chat instead of a page, use our WhatsApp link generator. For table cards that ask for reviews, start with the Google review link generator. And if your codes are going on Dubai Shopping Festival flyers, plan the dates with our DSF 2026 marketing plan.
QR code rules checked on 2 November 2026 on DENSO WAVE’s qrcode.com, in Apple’s and Google’s help centres and in Google Analytics Help. We update this page when they change. QR Code is a registered trademark of DENSO WAVE INCORPORATED.
Print campaigns you can measure
We plan and tag campaigns for brands in the UAE and Saudi Arabia, in Arabic and English, so a menu, a flyer and an Instagram ad can be compared in one GA4 report. See Performance Advertising and SEO & AI Search, or send us your next print run.
Questions and answers
Do QR codes expire?
A static QR code doesn’t: it holds the link itself and works for as long as the page does. A dynamic code holds a provider’s short address that redirects to your page, so it stops working if the provider stops redirecting it, for example when a subscription ends.
Are QR codes free to use for business?
Yes. DENSO WAVE, which holds the QR Code trademark, says no licence or fee is needed to use QR codes that follow the JIS or ISO standard, commercial use included. The trademark covers the words “QR Code”, not the pattern.
How do I track QR code scans in Google Analytics?
Add UTM tags to the link before you make the code, for example ?utm_source=flyer&utm_medium=qr&utm_campaign=dsf_2026. Scans then show as visits in Traffic acquisition. With medium qr they are Unassigned in GA4’s default channel group, unless you add a custom channel group.
What size should a QR code be?
DENSO WAVE, which created the QR code, gives none for phone cameras. A common rule of thumb is a width of about a tenth of the scanning distance for a simple code. Our generator scales it by the module count, which gives 5.9 cm, quiet zone included, for our 41 × 41 example read at 30 cm. Test a printed proof.
Which error correction level should I use?
M, which restores about 15% of the code, is the level DENSO WAVE says is chosen most often. Use Q or H where the code may get dirty or damaged, or carries a logo. They add modules, so print a little bigger.
Can I change a static QR code after printing?
Not the code itself. You can change what its page shows, or print a short address on your own domain and point it at a new destination with a redirect whenever you need to.
Sources
- FAQ, DENSO WAVE: the QR Code trademark, no licence or fee, colours and red light, transparent surfaces, phone reading depends on the camera (checked 2 November 2026)
- Error correction feature, DENSO WAVE: levels L, M, Q and H (about 7, 15, 25 and 30%), M chosen most often (checked 2 November 2026)
- Information capacity and versions, DENSO WAVE: versions 1 (21 × 21 modules) to 40 (177 × 177) (checked 2 November 2026)
- Point for determining the code area, DENSO WAVE: the 4-module quiet zone (checked 2 November 2026)
- Point for setting the module size, DENSO WAVE: larger modules read more reliably; print as large as the space allows (checked 2 November 2026)
- Examples of problems in reading a code, DENSO WAVE: distorted codes, crowded margins and overlays (checked 2 November 2026)
- QR Code standardization, DENSO WAVE: ISO/IEC 18004 since June 2000 (checked 2 November 2026)
- ISO/IEC 18004:2024, ISO: the current QR code symbology specification (checked 2 November 2026)
- Scan a QR code with your iPhone or iPad, Apple Support (checked 2 November 2026)
- Scan QR codes with your Pixel phone, Pixel Phone Help, and Scan QR codes on Camera from Google (checked 2 November 2026)
- Search with Google Lens in Chrome, Google Chrome Help: scanning a QR code on Android (checked 2 November 2026)
- URL builders: collect campaign data with custom URLs, Google Analytics Help: always set source, medium and campaign; values are case sensitive (checked 2 November 2026)
- Understand (direct) / (none) traffic, Google Analytics Help: untagged links, offline documents and redirects (checked 2 November 2026)
- Default channel group and custom channel groups, Google Analytics Help: Unassigned, groups that apply to past data, two per standard property (checked 2 November 2026)
- RFC 9110, HTTP Semantics, IETF: 301 and 302 redirects, and when a 301 may be cached (checked 2 November 2026)
- WCAG 2.2, contrast ratio, W3C: the luminance formula the generator uses as a proxy (checked 2 November 2026)
- Madmoun QR codes on real estate ads, Dubai Land Department (checked 2 November 2026)
- E-Invoicing Detailed Guidelines (PDF), ZATCA: the QR code on simplified and standard tax invoices (checked 2 November 2026)



