Need to generate QR codes on the fly? Skip the bloated npm packages. This API generates QR codes as PNG, SVG, or base64 — supports URLs, vCards, WiFi configs, emails, and phone numbers.
Try It Right Now
Generate a PNG QR code in your browser:
https://api.lazy-mac.com/qr-code/api/v1/generate?data=https://api.lazy-mac.com
Or get it as base64 for embedding:
curl -s "https://api.lazy-mac.com/qr-code/api/v1/generate/base64?data=Hello%20World" | jq
Response:
{
"base64": "data:image/png;base64,iVBORw0KGgoAAAANS..."
}
All Endpoints
| Endpoint | Description |
|---|---|
GET /api/v1/generate?data=TEXT |
Get QR as PNG image |
GET /api/v1/generate/base64?data=TEXT |
Get QR as base64 string |
POST /api/v1/generate |
Custom size, color, error correction |
POST /api/v1/vcard |
QR from vCard contact info |
POST /api/v1/wifi |
QR for WiFi network credentials |
Custom Styled QR Code
curl -s -X POST https://api.lazy-mac.com/qr-code/api/v1/generate \
-H "Content-Type: application/json" \
-d '{
"data": "https://api.lazy-mac.com",
"size": 500,
"format": "base64",
"errorCorrection": "H"
}' | jq
WiFi QR Code
curl -s -X POST https://api.lazy-mac.com/qr-code/api/v1/wifi \
-H "Content-Type: application/json" \
-d '{"ssid": "MyNetwork", "password": "secret123", "encryption": "WPA"}' | jq
Use as an MCP Server
{
"mcpServers": {
"qr-code": {
"url": "https://api.lazy-mac.com/qr-code/mcp"
}
}
}
Ask Claude: "Generate a QR code for my website URL"
HTML Integration
<img src="https://api.lazy-mac.com/qr-code/api/v1/generate?data=https://yoursite.com"
alt="QR Code" width="300" height="300">
That's it. One <img> tag. No JavaScript required.
Pricing
| Tier | Requests/mo | Price |
|---|---|---|
| Free | 100 | $0 |
| Pro | 10,000 | $9/mo |
| Business | Unlimited | $49/mo |
Browse all 22 APIs at api.lazy-mac.com →
More from the lazymac API Toolkit:
- Color Palette Generator API — Harmonious palettes from any color
- IP Geolocation API — Location from any IP
- Fake Data Generator API — Realistic test data
Top comments (0)