AMP Labs Utilities / QR Generator

QR Generator

GET /qr-generator?data=... returns a QR code image. The same URL with no data parameter returns this page. Public, unauthenticated, no tracking - email clients and partner pages can embed the URL directly in an <img>.

Parameters

NameDefaultRule
datarequired - Text to encode, 1 to 256 characters. Omit it entirely to get this page.
size 240 Edge length in pixels, clamped to 64..1024. A very dense payload may render larger than a tiny size so every module stays at least one pixel.
margin 2 Quiet zone in modules, clamped to 0..8.
ec M Error correction level: L, M, Q or H. Higher survives more damage but packs more modules.
format png png (image/png) or svg (image/svg+xml). Email clients want png.
fg 000000 Foreground colour as 3, 6 or 8 hex digits, with or without a leading # (URL-encode it as %23).
bg ffffff Background colour, same hex forms as fg, or the literal transparent.

Invalid parameters return 400 with a JSON body listing each failing parameter and its rule. Images are served with Cache-Control: public, max-age=31536000, immutable: identical inputs always produce identical bytes. Distinct payloads are rate-limited per client IP; cached repeats are not counted.

Try it

QR preview

URL



  

Unlayer email template (Portal / Marketing / Emails)

Merge tags are substituted by plain string replacement, including inside image URLs, so an image block whose URL contains {{code}} renders each recipient's own code. In the Prepaid Washes template add an Image block and paste this as its image URL:

https://utilities.amplabs.app/qr-generator?data={{code}}&size=240

Or, in an HTML block:

<img src="https://utilities.amplabs.app/qr-generator?data={{code}}&size=240" width="240" height="240" alt="Your wash code" />

If the tag is left unsubstituted the literal text {{code}} is encoded, so the image still renders - it just scans to the placeholder. External integrations (for example a partner confirmation page) use the same URL with their own value in data.