Logo

QR Code Generator API

Generate QR codes programmatically with a simple REST API. Included with all paid subscriptions.

All Paid PlansREST API8 QR TypesPNG, SVG & PDF
Quick Start
GET https://api.useqrkit.com/v1/qr?text=https://example.com&size=300

Quick start

Get Started in 60 Seconds

1

Make a Request

The simplest way to generate a QR code is a single GET request. Use your API key to authenticate requests.

curl "https://api.useqrkit.com/v1/qr?text=https://example.com&size=300" \
  --output qr-code.png
2

Customize Your Code

Add parameters to change size, colors, error correction, and logo:

URL
https://api.useqrkit.com/v1/qr?text=https://example.com&size=400&dark=1a73e8&light=ffffff&ecLevel=H&logo=https://example.com/logo.png
3

Choose Your QR Type

Set the type parameter to generate WiFi, vCard, SMS, or other QR code types. The API handles the correct data encoding automatically.

URL
https://api.useqrkit.com/v1/qr?type=wifi&text=SSID:MyNetwork;PASSWORD:secret123;ENCRYPTION:WPA&size=300

Try it

API Playground

Build your QR code generator API request interactively. Adjust the parameters below and copy the generated URL or cURL command directly into your project.

Generated API Request

GET Request URL
https://api.useqrkit.com/v1/qr?text=https%3A%2F%2Fexample.com
cURL
curl "https://api.useqrkit.com/v1/qr?text=https%3A%2F%2Fexample.com" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --output qr-code.png

QR types

QR Code Types

TypeParameterExample text FormatUse Case
URLtype=urlhttps://example.comWebsite links, landing pages
WiFitype=wifiSSID:Name;PASSWORD:pass;ENCRYPTION:WPAGuest WiFi access
vCardtype=vcardFN:John Doe;TEL:+1234567890;EMAIL:john@example.comContact cards, employee badges
SMStype=sms+1234567890:Hello from our appCustomer support, feedback
Emailtype=emailsupport@example.com:Subject:Body textContact links
Locationtype=location40.7484,-73.9857:Empire State BuildingStore locations, event venues
App Downloadtype=appIOS:https://apps.apple.com/...;ANDROID:https://play.google.com/...App install prompts
Plain Texttype=textAny text stringAsset tags, serial numbers

Each type is automatically encoded using the correct protocol (WIFI:, BEGIN:VCARD, sms:, mailto:, geo:, etc.).

How it works

What Is a QR Code API?

A QR code generator API lets developers generate QR codes programmatically through HTTP requests instead of using a manual web-based QR code generator. You send a request with your data and customization parameters, and the API returns a QR code image or data URI.

This is essential when QR codes need to be generated dynamically — inside a web application, mobile app, automated workflow, or print pipeline. Rather than manually creating each code, the API integrates directly into your existing systems and generates codes on demand.

Common use cases for a QR code API include generating unique codes for e-commerce order confirmations, embedding QR codes in automated emails, adding dynamic codes to invoices and shipping labels, and integrating QR-based authentication into mobile applications. For non-developers who need batch generation without code, the bulk QR code generator creates hundreds of codes from a CSV or Excel file.

QRKIT's API supports both static and dynamic QR codes. Static codes encode data permanently, while dynamic QR codes use a redirect URL that can be changed anytime, with scan analytics tracking. Dynamic codes never expire as long as your subscription is active.

Common Integration Patterns

E-Commerce & Receipts

Generate a unique QR code for every order confirmation, receipt, or return label. Customers scan to track shipments, access digital receipts, or initiate returns — all without typing a URL.

Marketing & Print Campaigns

Embed QR codes in automated email campaigns, direct mail, or packaging. Use dynamic codes so you can update the destination after printing and track every scan with analytics.

Document Generation

Add QR codes to invoices, shipping labels, event tickets, and certificates during PDF generation. The API returns images in PNG, SVG, or PDF format for pixel-perfect embedding in any document pipeline.

Authentication & Access Control

Generate one-time QR codes for two-factor authentication, event check-in, or temporary access passes. Pair with password-protected QR codes for an additional security layer.

API reference

API Parameters

Core Parameters

ParameterTypeRequiredDefaultDescription
textstringYesContent to encode in the QR code
typestringNourlQR type: url, wifi, vcard, sms, email, location, app, text
sizeintegerNo300Image width/height in pixels (50–2000)
formatstringNopngOutput format: png, svg, pdf, base64
marginintegerNo4Quiet zone width in modules (0–10)
ecLevelstringNoMError correction: L (7%), M (15%), Q (25%), H (30%)

Design Parameters

ParameterTypeDefaultDescription
darkhex string000000Foreground color
lighthex stringffffffBackground color
logostringLogo image URL or Base64 data URI
logoSizefloat0.25Logo size as fraction of QR code (0.1–0.4)
captionstringText displayed below the QR code

Authentication

ParameterTypeDescription
keystringAPI key (required for all API requests)

Error Handling & Response Codes

The API returns standard HTTP status codes. Successful requests return the QR code image directly. Errors return a JSON body with a message field describing the issue.

StatusMeaningCommon Cause
200SuccessQR code returned as image or data URI
400Bad RequestMissing or invalid parameter (e.g. empty text, size out of range)
401UnauthorizedMissing or invalid API key
429Rate Limit ExceededDaily request quota exceeded — check X-RateLimit-Remaining header
500Server ErrorInternal error — retry with exponential backoff
JSON Error Response
{
  "error": {
    "code": 400,
    "message": "Parameter 'text' is required",
    "details": "The text parameter must be a non-empty string"
  }
}

Rate limit headers are included in every response: X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset. Use these to implement client-side throttling and avoid hitting your daily quota.

Client libraries

Official SDKs & Libraries

While you can call the QR code generator API directly via HTTP, QRKIT also provides official client libraries that wrap the REST endpoints with idiomatic methods. Whether you need a QR code generator API for Python, JavaScript, PHP, or Go — install the library for your stack and start generating QR codes in a few lines of code.

# Install: pip install useqrkit
from useqrkit import QRKIT

client = QRKIT(api_key="YOUR_API_KEY")

# Generate a simple URL QR code
qr = client.generate(
    text="https://example.com",
    size=400,
    format="png"
)

# Save to file
with open("qr-code.png", "wb") as f:
    f.write(qr.content)

# Generate a WiFi QR code
wifi_qr = client.generate(
    text="SSID:Office;PASSWORD:secret;ENCRYPTION:WPA",
    type="wifi",
    size=300,
    dark="1a73e8"
)

All libraries support the full API surface including dynamic QR code creation, destination updates, and scan analytics retrieval. Each package includes TypeScript/type definitions, comprehensive error handling, and automatic retry logic for transient failures.

Dynamic codes

Dynamic QR Codes

QRKIT's dynamic QR code generator API goes beyond static codes. Dynamic QR codes use a short redirect URL — so you can update the destination anytime without reprinting the physical code. Create, update, and track codes programmatically through the REST API.

Create a dynamic QR code

bash
curl -X POST "https://api.useqrkit.com/v1/qr/dynamic" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text": "https://example.com/promo", "size": 300}'

Update the destination

bash
curl -X PUT "https://api.useqrkit.com/v1/qr/abc123" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{"text": "https://example.com/new-promo"}'

Retrieve scan analytics

bash
curl "https://api.useqrkit.com/v1/qr/abc123/scans" \
  -H "Authorization: Bearer YOUR_API_KEY"
JSON Response
{
  "total_scans": 1247,
  "unique_scans": 893,
  "scans_by_day": [...],
  "top_countries": [...],
  "top_devices": [...]
}

Dynamic QR codes require an API key and a paid plan. All scan data is available both through the API and the QRKIT dashboard.

Pricing

API Access & Rate Limits

API access is included with every paid subscription — no separate API add-on or per-request fees. Your plan determines your daily request quota:

Starter

5,000

requests / day

Pro

50,000

requests / day

Enterprise

Custom

dedicated limits

All plans include the full API feature set: static and dynamic QR codes, all 8 QR types, PNG/SVG/PDF/Base64 output, logo overlays, custom colors, and scan analytics. See pricing plans for full details and current rates.

Migration

Migrating from Google Image Charts QR API

Google deprecated its Image Charts API (including QR code generation) in 2019. If you're still using chart.googleapis.com URLs, you can migrate to QRKIT with minimal changes.

Before (Google Image Charts)

URL
https://chart.googleapis.com/chart?cht=qr&chs=200x200&chl=Hello+World

After (QRKIT API)

URL
https://api.useqrkit.com/v1/qr?text=Hello+World&size=200

The URL structure is simpler and the QR code generator API is actively maintained. QRKIT also supports features Google's API never offered: custom colors, logo overlays, multiple output formats, and dynamic QR codes with scan analytics.

QR Code API — Frequently Asked Questions

Get started

Start Building with the QR Code Generator API

Integrate the QR code generator API into your application and generate static and dynamic QR codes on demand. API access is included with all paid subscriptions.

Included with all paid plansREST API with GET and POSTCode examples in 4 languages