QR Code API
Every QR code style on FreeQRGen has an image URL. Change the destination parameter and you get a new code in the same style — no API key, no signup, no SDK.
Quick start
- Open the builder and design your QR code style.
- Copy the URL template or a code snippet for your language.
- Replace
destinationwith each link you want to encode. The URL returns the image directly.
https://freeqrgen.app/api/qr?destination=https%3A%2F%2Fexample.com&dot=rounded&dc=1d1d1f&cst=extra-rounded&csc=1d1d1f&cdt=dot&cdc=1d1d1f&bg=ffffff&cr=0.08&sz=600&format=png Reference
GET https://freeqrgen.app/api/qr All parameters are query-string values. Anything invalid falls back to its default.
| Parameter | Values | Default | Description |
|---|---|---|---|
destination | Any text, up to 2000 characters | required | What the QR code contains — usually a URL. URL-encode it. |
format | png, svg | png | Image type. Use PNG for email; SVG for web and print. |
sz | 64–2048 | 300 | Width and height in pixels. |
dot | rounded, square, dots, classy, classy-rounded, extra-rounded | rounded | Shape of the data dots. |
dc | Hex color without # | 000000 | Dot color. |
cst | square, dot, extra-rounded | square | Shape of the three large corner squares. |
csc | Hex color | 000000 | Corner square color. |
cdt | dot, square | dot | Shape of the dot inside each corner square. |
cdc | Hex color | 000000 | Corner dot color. |
bg | Hex color | ffffff | Background color. |
tp | 1 | off | Transparent background (overrides bg). |
cr | 0–0.5 | 0.08 | Outer corner rounding, as a fraction of the size. |
dgt, dgs, dge, dgr | linear | radial, hex, hex, 0–360 | off | Dot gradient: type, start color, end color, rotation in degrees. |
bgt, bgs, bge, bgr | linear | radial, hex, hex, 0–360 | off | Background gradient, same format as the dot gradient. |
Examples
HTML
<img
src="https://freeqrgen.app/api/qr?destination=https%3A%2F%2Fexample.com&dot=rounded&dc=1d1d1f&cst=extra-rounded&csc=1d1d1f&cdt=dot&cdc=1d1d1f&bg=ffffff&cr=0.08&sz=600&format=png"
width="600" height="600"
alt="QR code"
/> JavaScript
const params = new URLSearchParams({
destination: "https://example.com",
dot: "rounded",
dc: "1d1d1f",
cst: "extra-rounded",
csc: "1d1d1f",
cdt: "dot",
cdc: "1d1d1f",
bg: "ffffff",
cr: "0.08",
sz: "600",
format: "png",
});
const qrUrl = `https://freeqrgen.app/api/qr?${params}`;
// Use it as an image source…
document.querySelector("img").src = qrUrl;
// …or download it
const image = await fetch(qrUrl).then((res) => res.blob()); Python
import requests
res = requests.get(
"https://freeqrgen.app/api/qr",
params={
"destination": "https://example.com",
"dot": "rounded",
"dc": "1d1d1f",
"cst": "extra-rounded",
"csc": "1d1d1f",
"cdt": "dot",
"cdc": "1d1d1f",
"bg": "ffffff",
"cr": "0.08",
"sz": "600",
"format": "png",
},
)
res.raise_for_status()
with open("qr-code.png", "wb") as f:
f.write(res.content) cURL
curl -G "https://freeqrgen.app/api/qr" \
--data-urlencode "destination=https://example.com" \
-d dot=rounded \
-d dc=1d1d1f \
-d cst=extra-rounded \
-d csc=1d1d1f \
-d cdt=dot \
-d cdc=1d1d1f \
-d bg=ffffff \
-d cr=0.08 \
-d sz=600 \
-d format=png \
-o qr-code.png Other QR types
destination can be any QR payload, URL-encoded: mailto:hi@example.com, tel:+15551234567,
or WIFI:T:WPA;S:Network;P:password;;.
How it behaves
Cached forever
The same URL always returns the same image, so responses are cached by the CDN for a year. Thousands of loads of one image are served instantly.
Rate limits
Up to 600 new images per minute per IP address. Over the limit you get a 429 with a Retry-After header and a neutral placeholder image, so embeds don't break.
Responses
200 with image/png or image/svg+xml. 400 with a plain-text message if destination is missing, too long, or format is invalid. CORS is open, so you can fetch from the browser.
Privacy
Content is used only to draw the image and isn't stored. Logos aren't supported. See the privacy policy for details.