← Back to generator

QR Code API

Generate QR codes via a simple GET request. No API key, no signup.

Base URL

GET https://qrmake.dev/api/generate?data=YOUR_TEXT_OR_URL

Returns a QR code image directly. Default format is SVG.

Parameters

ParameterTypeDefaultDescription
datastringrequiredText or URL to encode (max 2,953 bytes at ec=L; 2,331 at M, the default; 1,663 at Q; 1,273 at H)
formatstringsvgsvg or png
sizeint256Image dimension in pixels (64 - 2048). PNG rounds down to a whole number of pixels per module, so it can be a few pixels smaller
fgstring000000Foreground color (6-char hex)
bgstringffffffBackground color (6-char hex)
ecstringMError correction: L, M, Q, H
marginint4Quiet zone in modules (0 - 10)
transparentboolfalseTransparent background (SVG & PNG)
downloadboolfalseSet Content-Disposition: attachment

Examples

Basic SVG

https://qrmake.dev/api/generate?data=https://example.com
Try it →

PNG with custom colors

https://qrmake.dev/api/generate?data=Hello+World&format=png&size=512&fg=2563eb&bg=f0f9ff
Try it →

High error correction, no margin

https://qrmake.dev/api/generate?data=https://qrmake.dev&ec=H&margin=0&size=400
Try it →

Embed in HTML

<img src="https://qrmake.dev/api/generate?data=https://example.com&size=200" alt="QR code">

Use in Markdown

![QR](https://qrmake.dev/api/generate?data=https://example.com&size=200)

curl

# Download as PNG
curl -o qr.png "https://qrmake.dev/api/generate?data=https://example.com&format=png&size=1024"

# Download as SVG
curl -o qr.svg "https://qrmake.dev/api/generate?data=https://example.com"

Response

Returns the QR code image directly with appropriate Content-Type header (image/svg+xml or image/png). Responses carry Cache-Control: public, max-age=3600, so browsers reuse an image for an hour.

On error, returns JSON with an error field and appropriate HTTP status code.

{ "error": "missing required parameter: data" }

CORS

All responses include Access-Control-Allow-Origin: *, so you can call the API from any web page via JavaScript.

Limits

No API key required. The API is a free service on shared Cloudflare infrastructure with no guaranteed capacity, so requests may fail under heavy load.