edoble QR API
A simple, database-free REST endpoint for generating QR codes on demand. It supports everything the generator on this site does — typed content (URL, text, email, phone, SMS, Wi-Fi), full styling, and centered logo overlays.
Endpoint
GET https://qr.edoble.in/api/qrcode
POST https://qr.edoble.in/api/qrcodeContent
Provide the QR content either as raw text, or as a structured type with its fields (same six types as the generator). If both are given, the typed fields win.
| type | Fields | Encodes as |
|---|---|---|
| url | url | https:// prefixed automatically if missing |
| text | text | raw text |
| email, subject, body | mailto:... | |
| phone | phone | tel:... |
| sms | phone, message | smsto:... |
| wifi | ssid, password, encryption | WIFI:T:...;S:...;P:...;; |
Without a type, pass raw content in text (or the legacy data alias).
Styling parameters
| Field | Type | Default | Description |
|---|---|---|---|
| format | string | png | png | svg | base64 |
| size | number | 512 | Image width in px (64–2048) |
| margin | number | 2 | Quiet zone size (0–10) |
| ecc | string | M | Error correction: L | M | Q | H |
| dark | hex color | #202089 | Foreground color |
| light | hex color | #FFFFFF | Background color |
Logo overlay
Matches the “Logo” option on the generator: a logo is centered on the QR code with a rounded white backing, aspect ratio preserved.
| Field | Type | Default | Description |
|---|---|---|---|
| logo | string | — | Logo image as a data: URL or an http(s) URL to fetch (max 5MB, must be an image) |
| logoScale | number | 0.2 | Logo size as a fraction of the QR width, clamped to 0.1–0.22 to stay reliably scannable |
- Only format=png and format=base64 support a logo — format=svg with a logo returns a 400 error.
- Error correction is automatically boosted (falling back H → Q → M → L if the content is too large) whenever a logo is present, so the code still scans with part of it covered. This can override your requested ecc.
GET example
curl "https://qr.edoble.in/api/qrcode?text=https://edoble.com&size=512&dark=%23202089" \
-o qrcode.png
# Structured content, e.g. Wi-Fi
curl "https://qr.edoble.in/api/qrcode?type=wifi&ssid=HomeNet&password=hunter2&encryption=WPA" \
-o wifi-qrcode.pngPOST example
curl -X POST https://qr.edoble.in/api/qrcode \
-H "Content-Type: application/json" \
-d '{
"text": "https://edoble.com",
"format": "base64",
"size": 512,
"dark": "#202089",
"light": "#FFFFFF"
}'
# With a logo overlay
curl -X POST https://qr.edoble.in/api/qrcode \
-H "Content-Type: application/json" \
-d '{
"type": "url",
"url": "https://edoble.com",
"logo": "https://edoble.com/logo.png",
"logoScale": 0.2,
"format": "png"
}' -o qrcode-with-logo.pngResponse
format=png or format=svg return the image directly (image/png or image/svg+xml). format=base64 returns JSON:
{ "dataUrl": "data:image/png;base64,..." }Notes
- No API key required, no database — every request is generated on the fly.
- CORS is enabled for all origins so you can call it from the browser.
- Rate limiting / auth can be added later without changing the response shape.