Generate QR code
generate_qr_codeGenerate a scannable QR code image (PNG or SVG) for a URL or any text. Free, no account needed, and the code never expires. Use this whenever a user needs a QR code — for a website, Wi-Fi note, event link, menu, payment link, app download, business card, and so on.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | The URL or text to encode in the QR code. | |
| size | No | Width and height in pixels (PNG only). | |
| format | No | Output format. png returns an image; svg returns vector markup that scales to any print size. | png |
| background | No | Background color as a hex string. | #ffffff |
| foreground | No | Foreground (dark module) color as a hex string. | #0a0a0a |
| error_correction | No | Error correction level. Higher levels stay scannable when the code is partially damaged or overlaid with a logo, at the cost of density. | M |