How to Add a QR Code to a Website, Step by Step
You'll learn: How to put a QR code on a web page, whether to use PNG or SVG, and how to keep it working and counted.
How to add a QR code to a website: the short answer
Make the code, download it as an image, upload that image to your website like any picture, and add alt text. That is all. Use SVG or a large PNG so it stays sharp, and make the code dynamic if you want to change where it goes or count scans.
Before you start, ask why. A visitor already on your website is on a computer or a phone. A QR code helps most when the visitor is on a desktop and wants to continue on their phone, such as opening a map, a booking page or an app link.

When a QR code on a website makes sense
- Desktop to phone. A visitor reads your page on a laptop and wants the directions on their phone.
- Download an app. One code that opens the App Store or Google Play depending on the phone.
- Print this page. A code at the bottom of a printable page links back to the online version.
- Event pages. A ticket or check-in code.
- Menu or price list. A page for people to take away.
When a QR code makes little sense: on a mobile page. People on their phone cannot scan their own screen. Give them a normal button instead.
Step by step: add a QR code to your site
Step 1: Choose the destination
Pick one page or action. For example, your Google Maps location, a booking form or your app store page.
Step 2: Make the code
For a fixed destination, use the free QR code generator. For a destination you may change, or to count scans, make a dynamic code in Scnr: open New QR, choose the type and fill in the details.

Step 3: Download SVG or a large PNG
SVG scales without blur and is small in file size. If your site builder will not take SVG, download PNG at a large size, then let the page shrink it. See SVG vs PNG.

Step 4: Upload and place it
Upload the image to your site's media library, like any picture. Place it near the text that explains it. Make it at least about 2 to 3 cm wide on the screen, and leave a clear space around it.
Step 5: Add alt text and a caption
Alt text tells screen readers and search engines what the image is. Write something like "QR code that opens our booking page". Add a short line above it: "Scan with your phone to book."
Step 6: Provide a normal link too
Always put a clickable link next to the code. Some people cannot scan, and phones cannot scan their own screen.
Step 7: Test on a real phone
Open your page on a laptop and scan from the screen with a phone. Check at normal zoom, and on a dark-mode setting if your site has one.
Common website platforms
You do not need special tools:
- WordPress, Wix, Squarespace, Shopify: add an image block and upload the file.
- Plain HTML: use an image tag with a clear alt text, and set the width in your style.
- Email or PDF on the site: use PNG, see QR code in email.
Colour and contrast
A code needs dark marks on a light background. On a dark site, place the code on a white tile. Avoid placing it over photos. See QR code colors.
Example: a wedding photographer in Colombo
This is a fictional example. Tharindu has a "Packages" page with a long price table that people read on their laptop. He adds a QR code under the table that opens the same page's WhatsApp link, so a couple can message him from their phone in a tap. He made it dynamic, so when his number changes he edits the code once, and the website image stays as it is.
Common questions
Q: Can I add a QR code to a website for free?
A: Yes. The free generator makes static codes with no account.
Q: Should the code be an image or generated live?
A: An image is simplest and works on any site builder.
Q: Will search engines read my QR code?
A: No. They read the alt text and the text around it.
Q: What size should it be?
A: Large enough to scan from a normal viewing distance. Around 2 to 3 cm wide on screen is a start; test it.
Next steps
Make your code in the free QR generator. To change the destination later, read what is a dynamic QR code.