REST API Documentation

Generate Base64 QR code images directly from your application instantly and securely.

Authentication

This API is kept private to prevent abuse. You must pass an Authorization Header with a Bearer token.
Test Key: demo-key-123

Endpoint

POSThttps://www.qrcodegenerator.codes/api/generate

Request Body

ParameterTypeRequiredDescription
valueStringYesThe URL, text, or payload to encode into the QR code.
darkColorStringNoHex code for the QR data (default: #000000)
lightColorStringNoHex code for the background (default: #ffffff)
sizeNumberNoImage size in pixels (default: 300)

Example Request (cURL)

curl -X POST https://www.qrcodegenerator.codes/api/generate \
  -H "Authorization: Bearer demo-key-123" \
  -H "Content-Type: application/json" \
  -d '{
    "value": "https://www.google.com",
    "darkColor": "#4F46E5",
    "size": 400
  }'

Example Response

{
  "success": true,
  "qrBase64": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA..."
}

You can render the base64 string directly in an HTML image tag: <img src="data:image..." />

Backlink Requirement

If you use this API in a public-facing application, we kindly require a standard Do-Follow backlink on your site indicating powered by or generated via qrcodegenerator.codes.

<a href="https://www.qrcodegenerator.codes">QR Codes powered by qrcodegenerator.codes</a>