generate-qrcode-dataurl
Convert text or URLs into QR codes as base64 data URLs for easy embedding in web applications, with customizable options for error correction, size, colors, and image format.
Instructions
Generate a QR code from text or URL and return it as a base64 data URL
Input Schema
Name | Required | Description | Default |
---|---|---|---|
options | No | QR code generation options | |
text | Yes | The text or URL to encode in the QR code |
Input Schema (JSON Schema)
{
"properties": {
"options": {
"additionalProperties": false,
"description": "QR code generation options",
"properties": {
"color": {
"additionalProperties": false,
"properties": {
"dark": {
"default": "#000000",
"type": "string"
},
"light": {
"default": "#FFFFFF",
"type": "string"
}
},
"type": "object"
},
"errorCorrectionLevel": {
"default": "M",
"enum": [
"L",
"M",
"Q",
"H"
],
"type": "string"
},
"margin": {
"default": 4,
"maximum": 10,
"minimum": 0,
"type": "number"
},
"type": {
"default": "image/png",
"enum": [
"image/png",
"image/jpeg",
"image/webp"
],
"type": "string"
},
"width": {
"maximum": 2000,
"minimum": 50,
"type": "number"
}
},
"type": "object"
},
"text": {
"description": "The text or URL to encode in the QR code",
"minLength": 1,
"type": "string"
}
},
"required": [
"text"
],
"type": "object"
}