Add a free QR code generator to any website with a single script tag. No API key, no signup, no iframe.
Paste this anywhere in your HTML:
<script src="https://qrgenapp.com/embed/qrgen.js"></script>That's it. The widget renders automatically where the script tag is placed.
Use data- attributes to customize:
<script src="https://qrgenapp.com/embed/qrgen.js"
data-accent="#0066ff"
data-placeholder="Enter your URL"
data-size="300"></script>| Attribute | Default | Description |
|---|---|---|
data-accent | #ff0000 | Accent color for button hover and focus states |
data-placeholder | https://example.com | Input placeholder text |
data-size | 256 | QR code image size in pixels |
For more control, use the JavaScript API:
<div id="my-qr-widget"></div>
<script src="https://qrgenapp.com/embed/qrgen.js"></script>
<script>
QRGen.init(document.getElementById('my-qr-widget'), {
accent: '#0066ff',
placeholder: 'Paste a link...',
size: 400,
});
</script>The widget uses Shadow DOM for style isolation — it won't affect your existing styles and your styles won't affect it. QR codes are generated via the QR Gen API (free, no auth required).
The embed widget is free for personal and commercial use. The "Powered by QR Gen" attribution must remain visible. If you need a white-label solution, contact us.