Embed Widget

Add a free QR code generator to any website with a single script tag. No API key, no signup, no iframe.

Quick Start

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.

Live Demo

Widget Preview

Customization

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>
AttributeDefaultDescription
data-accent#ff0000Accent color for button hover and focus states
data-placeholderhttps://example.comInput placeholder text
data-size256QR code image size in pixels

JavaScript API

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>

How It Works

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).

Terms

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.