QR codes are everywhere — menus, payments, authentication, marketing. If you need to generate QR codes programmatically, here's a comparison of the best APIs available in 2026.
Quick Comparison
| API | Free Tier | Paid From | Formats | Customization | Speed |
|---|---|---|---|---|---|
| Pandan QR | 500/mo | $5/mo | PNG, SVG | Colors, size, margin | <50ms |
| QRCode Monkey | Limited | $9/mo | PNG, SVG, PDF | Logo, colors, shapes | ~200ms |
| GoQR.me | Unlimited* | N/A | PNG, SVG, EPS | Colors, size | ~150ms |
| QR Server | Unlimited* | N/A | PNG, GIF, JPEG, SVG | Colors, size, margin | ~100ms |
*Rate limits may apply without documentation
1. Pandan QR Code API
The simplest option — one GET request, no API key needed for the free tier.
# Basic QR code
curl "https://qr.pandan.is/v1/qr?text=https://example.com" -o qr.png
# Custom colors (dark purple on black)
curl "https://qr.pandan.is/v1/qr?text=hello&color=7b2ff7&bg=0a0a0a&size=500"
# SVG format for scalable graphics
curl "https://qr.pandan.is/v1/qr?text=hello&format=svg"
// JavaScript/Node.js
const response = await fetch('https://qr.pandan.is/v1/qr?text=hello&size=300');
const blob = await response.blob();
// Use in <img> tag or save to file
Why choose Pandan: Fastest response times (<50ms), clean API design, generous free tier (500/month), custom colors built-in. No signup or API key required.
2. Building Your Own (node-qrcode)
If you need offline generation or very high volume, you can use a library directly:
// npm install qrcode
const QRCode = require('qrcode');
// Generate to file
await QRCode.toFile('qr.png', 'https://example.com');
// Generate as data URL
const dataUrl = await QRCode.toDataURL('https://example.com');
Pros: No external dependency, unlimited.
Cons: You manage the code, no built-in analytics, deployment overhead.
Use Cases by Volume
- <500/month: Use Pandan QR free tier — zero setup, zero cost
- 500–10,000/month: Pandan Pro ($5/mo) — cheapest paid option with support
- >100,000/month: Self-hosted with node-qrcode or Pandan Business ($29/mo)
Integration Example: Add QR Codes to Your SaaS
// React component
function QRCode({ text, size = 200 }) {
return (
<img
src={`https://qr.pandan.is/v1/qr?text=${encodeURIComponent(text)}&size=${size}`}
alt="QR Code"
width={size}
height={size}
/>
);
}
// Usage
<QRCode text="https://myapp.com/invite/abc123" size={300} />
That's it — one line in your JSX and you have dynamic QR codes. No npm install, no build step, no API key.
Related
- Screenshot API — Capture any website as an image
- OG Image API — Generate social preview images
- Best Free APIs for Developers