Thursday, May 22, 2025

Just a QR Code

Every once in a while you need to generate a QR code.  You type "qr" into your address bar and hope your history still has something useful, but when it doesn't, you go ahead and google it.  Reviewing the array of results, you pick the least sketchy-looking one.  You enter your text, save the QR code, and quickly close the browser tab.  Why so furtive?

Because you know that the site's not just randomly passionate about giving free QR codes to the world -- it's not some Johnny Appleseed of machine-vision -- someone expects to get paid.  And that's why the page includes ads, it's laden with trackers, whatever you type is sent to a remote server, and it's setting all kinds of cookies on your browser.  All for just a QR code.

"Isn't it possible to just make a one-page website that uses Javascript to generate QR codes?  Something I could save to disk and run locally," I pondered.

Screenshot of the just a QR code dot com site
Yes.  Yes it is.  (Spoiler, here it is.)

In about 19k of HTML and Javascript (and half of that is comments and easter eggs) it does exactly what you'd expect.  You type something, it makes a QR code.  You can also set the size, error correction, and colors.  And that's it.  Just a QR code.  Holy heck it works.  And there is no "pro" plan.

I uploaded it to my webserver for sharing.  And as I looked at the URL I realized, yes, I definitely need to be paying for another single-project custom domain name.  My project shall have no path in its URL!  It shall be the one and true main page.  After half an hour of trying to be clever, I discovered that "just a qr code" dot com was available for ten bucks.  Sure, whatever.  Ship it!

I present to you: justaqrcode.com

Check it out -- you can view the page source and confirm that it doesn't send anything anywhere.  There are no trackers.  You can save it to your local disk and run it from there.  Go ahead and modify your copy to suit your own needs.

What's my payback for the domain name and hosting costs?  I don't know.  But I'm really annoyed at the state of the world right now and this is somehow my way of fighting back.  I'll keep paying for the domain name and hosting, and you keep being awesome.