QR Code Generator API

Interactive Example - Free to Use

Generate QR Code

API URL will appear here...

Preview

Your QR code will appear here

Code Examples

HTML

<img src="https://yourdomain.com/api/qr?data=https://example.com" alt="QR Code">

JavaScript (Fetch API)

fetch('https://yourdomain.com/api/qr?data=https://example.com&size=400')
  .then(response => response.blob())
  .then(blob => {
    const url = URL.createObjectURL(blob);
    const img = document.createElement('img');
    img.src = url;
    document.body.appendChild(img);
  });

PHP

$data = urlencode("https://example.com");
$url = "https://yourdomain.com/api/qr?data={$data}&size=500";
$image = file_get_contents($url);
file_put_contents("qrcode.png", $image);

Python

import requests

url = "https://yourdomain.com/api/qr"
params = {
    "data": "https://example.com",
    "size": 500,
    "format": "png"
}

response = requests.get(url, params=params)
with open("qrcode.png", "wb") as f:
    f.write(response.content)

cURL

curl "https://yourdomain.com/api/qr?data=https://example.com&size=600" -o qr.png