The simplest call
https://qrcodeforge.com/api/v1/qr.svg?data=https://example.com

PNG, 1024 px, rounded, brand blue
https://qrcodeforge.com/api/v1/qr.png?data=https://example.com&size=1024&body=rounded&eyeFrame=rounded&fg=1d3fbf
Gradient with a banner frame
https://qrcodeforge.com/api/v1/qr.svg?data=https://example.com/menu&gradient=linear&fg=8f1d18&fg2=d9660b&frame=banner&label=SCAN%20ME

Transparent background, WiFi
https://qrcodeforge.com/api/v1/qr.png?data=WIFI%3AT%3AWPA%3BS%3ACafeNet%3BP%3Ahunter2%3B%3B&bg=transparent&body=dot
Endpoints
Two addresses, one set of parameters
GET https://qrcodeforge.com/api/v1/qr.svg?data=… GET https://qrcodeforge.com/api/v1/qr.png?data=…&size=512
Both answer with the image and permissive CORS, so a browser can use them directly. Responses are cacheable for a day. Errors come back as JSON with a message naming the parameter.
Parameters
Everything the generator can do
| PARAMETER | DEFAULT | VALUES |
|---|---|---|
| data | required | What the code contains: a link, text, a WiFi string, a vCard… up to 2000 characters, URL-encoded. text and url are accepted as aliases. |
| size | 512 | PNG width in pixels, 64–2048. Ignored for SVG, which scales to any size. |
| ec | M | Error correction: L, M, Q, H. Higher survives more damage and leaves room for a logo; H is the most durable. |
| fg | 000000 | Module colour, six hex digits, no hash. |
| bg | ffffff | Background colour, six hex digits — or transparent. |
| gradient | none | none, linear, radial. With linear or radial, fg is the first stop and fg2 the second. |
| fg2 | — | Second gradient colour. |
| eye | same as fg | Colour of the three corner eyes. |
| body | square | square, rounded, extra-rounded, dot, classy, classy-rounded, diamond, leaf, star, hexagon, triangle, heart, cross, sparkle, vertical-bars, horizontal-bars, pixel-gap, fluid, mosaic, tile |
| eyeFrame | square | square, rounded, extra-rounded, circle, leaf, octagon, cut-corner, dotted, corner-arcs, shield |
| eyeBall | square | square, rounded, circle, diamond, leaf, star, heart, flower |
| frame | none | none, banner, card, badge, speech-bubble, arrow, ticket, phone, circle |
| label | — | Text on the frame, up to 40 characters. |
| labelPosition | bottom | top, bottom |
| frameColor | same as fg | Frame colour, six hex digits. |
Examples
In a page, in a script
<img src="https://qrcodeforge.com/api/v1/qr.svg?data=https%3A%2F%2Fexample.com&body=rounded"
width="200" height="200" alt="Scan to open example.com">curl -o code.png "https://qrcodeforge.com/api/v1/qr.png?data=https%3A%2F%2Fexample.com&size=1024"
const url = new URL('https://qrcodeforge.com/api/v1/qr.svg')
url.searchParams.set('data', 'https://example.com/order/1234')
url.searchParams.set('frame', 'banner')
url.searchParams.set('label', 'ORDER 1234')
const svg = await (await fetch(url)).text()Fair use
Free, within reason
- Each address may make about 600 requests an hour. Past that, requests are refused with status 429 and a
Retry-Afterheader. Cache the image on your side; it never changes for the same parameters. - Codes are static: the data is in the pattern, nothing is stored, and they work forever. For codes you can edit after printing, use dynamic codes on the site.
- A link back to qrcodeforge.com is appreciated, not required.
- No abuse: no codes for phishing, malware or anything illegal. Addresses doing that are blocked.