Skip to main content

QR Code Generator

QR code for any data โ€” text, URL, WiFi, email, SMS, phone, vCard, geo. PNG, SVG, JPG or GIF. Size selectable.

Endpointโ€‹

GET/qr?text=hello
QR image (PNG default) โ€” direct download.
GET/qr?text=hello&json=1
QR URL as JSON (image link).

Supported Data Typesโ€‹

Type auto-detected from params. Explicit type= also supported.

TypeParamsQR Content
texttext= / data=Plain text
urlurl=Link โ€” https:// auto-add
wifissid= password= encryption=WiFi connect
emailemail= subject=mailto:
phonephone=tel:
smsphone= body=SMSTO:
vcardname= phone= email= org=Contact card
geolat= lon=geo: location

Size & Formatโ€‹

ParameterValuesDefaultNotes
size50โ€“2000200Square px (clamped)
formatpng ยท svg ยท jpg ยท gifpngImage format
colorhex e.g. 6366f1blackQR color
bghexwhiteBackground
json1โ€”JSON instead of image

Example โ€” Textโ€‹

curl -o qr.png "https://api.apimitra.in/qr?text=hello&size=300"

Example โ€” URL (auto-detect)โ€‹

curl -o link-qr.png "https://api.apimitra.in/qr?url=apimitra.in&size=300"

Example โ€” WiFi QRโ€‹

curl -o wifi-qr.png "https://api.apimitra.in/qr?ssid=HomeNet&password=secret123"

Example โ€” UPI Payment QRโ€‹

curl -o upi-qr.png "https://api.apimitra.in/qr?text=upi://pay?pa=yourname@upi&pn=Name&size=400"

Example โ€” vCard (Contact card)โ€‹

curl -o contact-qr.png "https://api.apimitra.in/qr?name=Arnab&phone=9876543210&org=NeXaric"

Example โ€” Geo locationโ€‹

curl -o geo-qr.png "https://api.apimitra.in/qr?lat=22.57&lon=88.36"

Example โ€” JSON response (base64, local)โ€‹

curl "https://api.apimitra.in/qr?url=apimitra.in&size=500&json=1"
{
"status": "ok",
"api": "qr",
"type": "url",
"size": 500,
"format": "png",
"qr": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...",
"content": "https://apimitra.in"
}
note

QR 100% locally generated โ€” no external service, no third-party URL visible. qr field = base64 data URL โ€” use directly in <img src="...">. PNG default, SVG supported. Cached 24h. Size clamped between 50โ€“2000.