Generate a QR code as a base64-encoded PNG.
by Faro
Generates a QR code as a base64-encoded PNG, encoding any text or URL. Size, error-correction level, and border width are configurable.
Returning a base64 PNG inline keeps the workflow single-call: agents can embed the result directly into a document, email, or HTML response without managing storage or file handoff. Configurable error-correction levels let you trade size for resilience when codes will be printed small or on uneven surfaces.
Higher error-correction levels produce denser codes that survive partial occlusion (such as a centered logo) but require more space. Adjust the border (quiet zone) to ensure reliable scanning when embedding in tight layouts.
Text or URL to encode into the QR code.
Output image size in pixels (square).
Quiet-zone border width in modules.
Output image format.
QR error-correction level. Higher levels tolerate more damage but encode less data.