HACKER Q&A
📣 obilgic

Why are QR codes not clickable links on browsers?


Why are QR codes not clickable links on browsers?


  👤 zzo38computer Accepted Answer ✓
The HTML file that has them does not make it a link, I suppose.

A browser extension perhaps could add a command to decode a QR code (and possibly other barcodes), or an external program could do so from a screen capture or file or camera or any other video source (allowing it to work independently of the web browser).


👤 killingtime74
If they were then you'd have to do one of two things: 1) ocr all images to check if they are QR codes 2) embed metadata saying that this image is a QR code and a link. If you were betting on the metadata then why not just create a link directly...

👤 _dwivedi
I guess it is mostly because of the reason that QR codes are not always a URL! It might be something related to a payment or a wifi conf. Plus I don't think that browsers scanning every image for QR codes by default would be very great for it's efficiency and overall user privacy. But I think it could always be a good option to have especially for QR codes which are link. You can always use a extention though! :)

👤 al_borland
I would hope the developer would add a link the user could simply click, instead of needing to translate a QR code to get the link.

The assumptions made around a lot of QR codes don’t make much sense to me.


👤 Leftium
iOS Safari has a special "QR" menu if you long-tap a QR code.

And this is built in to Android OS: "Search your screen" or "Circle to Search."[1]

[1]: https://www.android.com/ai/circle-to-search/


👤 phyrex
It's a good idea. Obviously you can't preemptively OCR all images but having "context menu -> follow link" which works on QR codes and images with links in them seems totally doable do me

👤 fouc
sometimes youtube videos show QR codes somewhere on the screen now, and it sure would be nice to be able to easily click on those.

👤 paulwilsonn
Because browsers treat QR codes as images, not data. They don’t natively parse or extract links unless you use a camera or scanner API.

It’s mostly a UX and security choice-automatically turning any image with a QR into a clickable link could be abused for phishing or tracking.

That said, it’d be cool if browsers offered a “Scan QR in page” option like mobile OSes do.


👤 gethly
They would require some kind of built-in OCR. And I can easily see this having a strong potential for security bugs. On the other hand, I'd like to have such support, especially on mobile phone in order to bypass the need to use the phone's camera for that OCR step.