QR Code Generator API
Generate QR codes as PNG, SVG, or data URI — custom size, colors, margin, and error correction.
Get it on RapidAPI ↗Turn any text or URL into a QR code over a single, fast API call — returned as a PNG image, a scalable SVG, or a base64 data URI you can drop straight into an tag. Stateless, no SDK, no signup.
Customize the size, quiet-zone margin, error-correction level (L/M/Q/H), and foreground/background colors. Perfect for tickets, menus, business cards, 2FA setup, inventory labels, and link sharing.
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /qr/generate?data=&format= | PNG, SVG, or data-URI QR code |
| POST | /qr/generate | Same, with a JSON body (for long data) |
Quick start
curl --url 'https://qr-code-generator216.p.rapidapi.com/generate?data=https://abundanceapis.com&format=datauri' \
--header 'X-RapidAPI-Key: YOUR_KEY' \
--header 'X-RapidAPI-Host: qr-code-generator216.p.rapidapi.com'const res = await fetch('https://qr-code-generator216.p.rapidapi.com/generate?data=https://abundanceapis.com&format=datauri', {
headers: {
'X-RapidAPI-Key': 'YOUR_KEY',
'X-RapidAPI-Host': 'qr-code-generator216.p.rapidapi.com'
}
});
const data = await res.json();{
"format": "png",
"dataUri": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA..."
}Pricing
Subscribe on RapidAPI. Start free; upgrade as you scale.
Frequently asked questions
What output formats are supported?
format=png returns a PNG image, format=svg returns a scalable SVG, and format=datauri returns JSON with a base64 data URI ready for an src.
Can I customize colors and size?
Yes — set size (64–2000px), margin (0–20), ecc (L/M/Q/H), and dark/light hex colors.
Is there a limit on the data length?
Up to 2,000 characters per QR code, which covers URLs, vCards, Wi-Fi configs, and most payloads.
Ready to build with QR Code Generator?
Grab your key on RapidAPI and start on the free tier.
Get it on RapidAPI ↗