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.
| Type | Params | QR Content |
|---|---|---|
| text | text= / data= | Plain text |
| url | url= | Link โ https:// auto-add |
| wifi | ssid= password= encryption= | WiFi connect |
email= subject= | mailto: | |
| phone | phone= | tel: |
| sms | phone= body= | SMSTO: |
| vcard | name= phone= email= org= | Contact card |
| geo | lat= lon= | geo: location |
Size & Formatโ
| Parameter | Values | Default | Notes |
|---|---|---|---|
size | 50โ2000 | 200 | Square px (clamped) |
format | png ยท svg ยท jpg ยท gif | png | Image format |
color | hex e.g. 6366f1 | black | QR color |
bg | hex | white | Background |
json | 1 | โ | 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.