One request, start to finish
curl -o menu.png "https://qrcodesforever.com/qr.png?url=example.com&size=1024"
That's the whole API: a GET with the content in the query string. The response is a 1024-pixel PNG of a QR code that opens https://example.com. We add the https:// when you leave it off. Swap /qr.png for /qr.svg to get a vector file instead.
The live SVG endpoint returned these headers on 1 December 2026:
content-type: image/svg+xml; charset=utf-8
cache-control: public, max-age=31536000, immutable
access-control-allow-origin: *
x-content-type-options: nosniff
content-security-policy: default-src 'none'; style-src 'unsafe-inline'
The cache header is a year because the image for a given URL never changes. The open CORS header means fetch() works from any website.
What each URL puts in the code
A QR code is only as good as the text inside it, so here is exactly what our encoder writes for a few common requests. Every row was generated with the same code that serves the API and decoded again to check it.
| Request | Text inside the code | QR version |
|---|---|---|
?url=example.com | https://example.com | 2 (25×25) |
?text=Table%2012 | Table 12 | 1 (21×21) |
?ssid=Cafe%20Guest&password=coffee123 | WIFI:T:WPA;S:Cafe Guest;P:coffee123;; | 3 (29×29) |
?type=whatsapp&whatsapp=919876543210&message=Hi | https://wa.me/919876543210?text=Hi | 3 (29×29) |
?q=Eiffel%20Tower | https://www.google.com/maps/search/?api=1&query=Eiffel%20Tower | 4 (33×33) |
?upi=shop@okaxis&amount=250 | upi://pay?pa=shop@okaxis&am=250.00&cu=INR | 3 (29×29) |
The parameter reference covers all 14 kinds, including contact cards, calendar events, Pix, SEPA transfers and crypto. Fewer characters means a lower version with bigger squares, which scans from further away; the versions and capacity guide explains the trade.
Encode the value, or the code will lie
The value sits inside a URL, so &, #, + and spaces have to be percent-encoded. Skip it and the API reads something you didn't mean:
| You send | The code contains |
|---|---|
?url=https://shop.com/?a=1&b=2 | https://shop.com/?a=1 (the b=2 became a separate parameter) |
?url=https%3A%2F%2Fshop.com%2F%3Fa%3D1%26b%3D2 | https://shop.com/?a=1&b=2 |
?phone=+441234567890 | tel:441234567890 (the + turned into a space) |
?phone=%2B441234567890 | tel:+441234567890 |
Both broken versions still return a valid image. Nothing errors, and the code quietly opens the wrong thing. Use your language's encoder: encodeURIComponent in JavaScript, urllib.parse.urlencode in Python, ENCODEURL in spreadsheets.
Style
fg and bg take six-digit hex colors without the #. pattern is square, rounded or dots, and corners is square, rounded or circle:
/qr.svg?url=example.com&fg=1d3fd6&bg=ffffff&pattern=dots&corners=circle
Light modules on a dark background fail on some phone scanners, so run unusual pairs through the contrast checker first.
When it says no
Missing or invalid content gets a 400 with this exact plain-text body:
Missing or invalid content. Try ?url=example.com, ?upi=name@bank or ?type=wifi&ssid=MyWifi
Content too large for one QR code gets a 413 and Too much data for one QR code. A thousand Chinese characters is enough to trigger it, because each one takes three bytes.
Who should use something else
The content travels to our server in the URL. For anything private, such as a Wi-Fi password you'd rather not send over the network, make the code in the generator instead, where it never leaves your browser, or use an offline library. If you need a logo, use the generator too, because a URL can't carry an image. And if you need to change where a printed code points, or count scans, you need a dynamic code, which we don't sell yet.
A paid REST API for logos and batch jobs is planned. It doesn't exist yet, and the image URLs on this page will stay free when it arrives. Until then, the bulk generator makes hundreds of codes from a CSV in your browser.