API Depot/APIs/QR Code Generator

QR Code Generator

live

Generate a QR code from any string — URLs, vCard data, plain text. Returns base64-encoded PNG or SVG with configurable scale and colours.

POST /v1/qr/generatePer request

Request

FieldTypeDescription
content*stringString to encode (max 2048 chars)
format"png" | "svg"Output format (default: "png")
scaleintegerScale factor 1–40 (default: 10)
darkstringDark module colour as #rrggbb (default: "#000000")
lightstringLight module colour as #rrggbb (default: "#ffffff")

Response

FieldTypeDescription
formatstringOutput format used: png or svg
datastringBase64-encoded image bytes
mime_typestringMIME type: image/png or image/svg+xml

Example

Request

{
  "content": "https://apidepot.io",
  "format": "png",
  "scale": 10
}

Response

{
  "format": "png",
  "data": "iVBORw0KGgoAAAANSUhEUgAA...",
  "mime_type": "image/png"
}

Notes

  • Sync endpoint — generation is under 50ms for typical inputs.
  • Decode with: <img src="data:{mime_type};base64,{data}" />
  • SVG output is text-based; it can be embedded directly in HTML without decoding.
  • Error correction level M is used — balances size and resilience.

Try it