GET
/api/v1/qr
Generate a QR code
GET /api/v1/qr turns any string into a QR code image with no key and no signup. Pass the payload as data (text, content, url and q also work), and optionally size, format, style, colours and error correction. Responses are deterministic and cache forever.
View as MarkdownPaste this page into any AI assistant — it is plain, portable Markdown.
Try it
GET/api/v1/qr?
Parameters
| Name | Type | Detail |
|---|---|---|
| dataREQUIRED | string | What the code should contain. Anything up to 2,953 bytes.also accepts text, content, url, q, chl |
| size | integer · 512 | Pixel width of the rendered image. Ignored for svg and json.64–4096also accepts width, s, chs |
| format | enum · png | What comes back. svg-tiny is SVG Tiny 1.2, for Illustrator and cutters.png · svg · svg-tiny · json · base64also accepts type, output, f |
| style | enum · square | Module shape.square · rounded · dot · diamond · star · vertical-bars · horizontal-bars · organicalso accepts dots, modulestyle |
| eye | enum | Finder-pattern shape.square · rounded · circle · leaf · diamondalso accepts eyes, eyestyle |
| color | string · 000000 | Foreground, as a 3- or 6-digit hex value with or without the #.also accepts fg, dark, foreground |
| bg | string · ffffff | Background. `transparent` is accepted.also accepts light, background, bgcolor |
| ec | enum | Error correction. H survives the most damage but makes a denser code.L · M · Q · Halso accepts ecc, level, errorcorrection |
| margin | integer · 4 | Quiet zone in modules. The spec asks for 4.0–10also accepts quiet, quietzone, qz |
| verify | boolean · 0 | Run the full decode round-trip before responding and report it in x-qr-verified. Costs a rasterize and a decode, so it is off by default.1 · 0also accepts check |
- Every response carries x-qr-version, x-qr-ec, x-qr-modules and (when both colours are known) x-qr-contrast.
- Cache-Control is immutable: the same query always produces the same bytes.
When you get it wrong
Errors are RFC 9457 problem+json with one addition: a fix field containing a corrected call you can run as-is.
{
"type": "https://useqr.app/errors",
"title": "Invalid parameter",
"status": 400,
"detail": "\"pink\" is not a color we understand",
"fix": "use a hex color like color=0f172a (with or without #), e.g. ?data=hello&color=0f172a"
}