Hook

Their other posts in the index, biggest breakout first.
If I type any text or paste any link here, you can see that it instantly generates a QR code. And you can build this with just a few lines of code. First, I'll create a text input, then a button for the generate option. After that, I'll create a div with the class qr-box and inside it, I'll add an image tag with the ID qr to display the QR code. Now, let's move to JavaScript. I'll select the button using document.querySelector("button").onclick = () => { qr.src = "https://api.qrserver.com/v1/create-qr-code/?data=" + text.value; }; This sends whatever we type in the input to the QR code API. Finally, I'll paste the free QR code API in the comments. Now, whenever we type any text or URL and click the Generate button, it will instantly be converted into a QR code.