QR Code Generator DE EN

Interface: a QR code as an image

One image link is enough: put the base64 encoded content into the address and the answer is a PNG or SVG. Use it in pages, mails and documents. The address of the old site keeps working unchanged.

Address

GET https://qrcode.loresoft.de/interface/qrcode?content=<base64>&level=L&size=4

Parameters

NameValuesDefaultMeaning
contentbase64-Content, base64 encoded (plain or URL-safe), 1000 characters at most
levell · m · q · hlError correction
size1 … 104Pixels per module (PNG only; SVG scales)
margin0 … 81Quiet zone in modules (recommended: 4)
formatpng · svgpngOutput format
download1-1 = deliver as a file to save

Note: callers of the old address get PNG, level L, 4 pixels per module and a 1 module border when nothing is given, as before.

Examples

Image in HTML

<img src="https://qrcode.loresoft.de/interface/qrcode?content=aHR0cHM6Ly93d3cubG9yZXNvZnQuZGUv&level=m&size=6&margin=4" alt="QR">

Fetch a file

curl -o code.svg "https://qrcode.loresoft.de/interface/qrcode?content=aHR0cHM6Ly93d3cubG9yZXNvZnQuZGUv&format=svg"

Build the address in PHP

$url = 'https://qrcode.loresoft.de/interface/qrcode?' . http_build_query([
 'content' => rtrim(strtr(base64_encode($text), '+/', '-_'), '='),
 'level' => 'm', 'size' => 6, 'margin' => 4,
]);

Limits

Up to 200 newly created images per day and address; images created before are served from a cache and do not count. Answers can be cached by the browser for a long time.

Errors

On an error the interface answers with a fitting status code (400 or 429) and a JSON object like {"err": "text"}.