One of my favorite components from the open source web components library Shoelace is the QR code generator:
<a href="https://shoelace.style/components/qr-code" rel="nofollow">https://shoelace.style/components/qr-code</a>
This looks great! Wish I had it a few months ago instead of having to use qr-code-styling[0] which was a bit of a pain.<p>I remember it was around the same time that Obsidian got native callouts, so my notes for that project are all colourful & contain valuable admonitions like this:<p>```<p>> [!todo]<p>> That feeling when you're wasting hours of your life trying to make something you know is abandonware work just because it looks nice. There should be a word for that feeling. In Danish or Japanese. Or German.<p>```<p>[0]: <a href="https://github.com/kozakdenys/qr-code-styling">https://github.com/kozakdenys/qr-code-styling</a>
If you're looking for a non web QR generator with lots of options try Zint. <a href="https://www.zint.org.uk/" rel="nofollow">https://www.zint.org.uk/</a> It's the only option I have found that doesn't seem to lock out any features. You want to control the error correction? Got it. Render in color? No problem. Batch convert 1000 lines of text into 1000 individual images. It took less than a second. It even does Datamatrix and other non QR encodings.
USE THIS SOFTWARE AND LEARN FROM MY MISTAKE:<p>We made a cute Christmas video to include in our card this year. My wife created a QR code from a random website and included it in the card as a picture. It linked to our video. We sent all of the cards out. People loved it.<p>... except we got an email from the QR code company about a week before Christmas. We went over our "free" click (the QR code went through their URL shortener). If we wanted to keep the QR code active we had to pay $20/mo.<p>We got absolutely fleeced. Never again. Control the URL and make the QR image yourself.
If you stumbled upon this looking for the smallest QR code JS library, it's probably LeanQR [0]. It's under 10kb minified and 5kb compressed.<p>[0] <a href="https://qr.davidje13.com/" rel="nofollow">https://qr.davidje13.com/</a>
I found that Anthony Fu's QR Toolkit is a great alternative: <a href="https://qrcode.antfu.me/" rel="nofollow">https://qrcode.antfu.me/</a>
I've been using this library: <a href="https://www.npmjs.com/package/qrcode" rel="nofollow">https://www.npmjs.com/package/qrcode</a>.<p>Works great and it does svg too. There are a few alternatives to this around as well but this one seems good enough.
You can try <a href="https://app.y.gy" rel="nofollow">https://app.y.gy</a>. It's not a library, but they have an API for link-shortening and QR Code Generation.
"The demo on this page combines Project Nayuki’s QR Code generator library (a multi-language open source project that can, among other things, perform the conversion of text into raw QR code data) with my own QRSVG project, which can turn a QR-like two-dimensional boolean data map into an efficient vector description of its own visualization by tracing the contours of contiguous shapes."
For local use, this Python library can generate SVGs with QR codes: <a href="https://github.com/lincolnloop/python-qrcode">https://github.com/lincolnloop/python-qrcode</a>