QR code generator

Make a scannable QR code as SVG from any text or link, with a choice of size, colours and error correction. A complete QR encoder (byte mode, UTF-8, versions 1 to 40) that picks the smallest version that fits, tries all eight masks and reads every code back before returning it.

Input

The text or link to store in the code.
How much damage the code survives: L about 7%, M 15%, Q 25%, H 30%. Higher levels hold less.
Width of one small square (module) in pixels.
Blank quiet zone around the code, in modules. Scanners expect at least 4.
Colour of the dark squares: hex such as #000000, or a basic colour name.
Colour behind the code: hex, a basic colour name, or "transparent".

Result

Fill in the input and press Run.

Your input is processed in memory and then discarded. It is not stored or logged. Even so, don't paste live passwords or keys into any online tool.

Use it from code or an agent

curl -s https://setget.net/v1/tools/qr-generate \
  -H 'Content-Type: application/json' \
  -d '{"input":{"text":"https://setget.net"}}'
import json, urllib.request

body = {'input': {'text': 'https://setget.net'}}
request = urllib.request.Request("https://setget.net/v1/tools/qr-generate", json.dumps(body).encode(),
                                 {"Content-Type": "application/json"})
print(json.load(urllib.request.urlopen(request))["result"])
const response = await fetch("https://setget.net/v1/tools/qr-generate", {
  method: "POST",
  headers: {"Content-Type": "application/json"},
  body: JSON.stringify({"input":{"text":"https://setget.net"}}),
});
console.log((await response.json()).result);
Tool: run_tool
Arguments:
{
  "slug": "qr-generate",
  "input": {
    "text": "https://setget.net"
  }
}
{
  "input": {
    "text": "https://setget.net"
  }
}

Endpoint: POST /v1/tools/qr-generate. Over MCP: run_tool with slug: "qr-generate". Machine-readable: input schema, Markdown. Connect an agent.

Inputs

NameTypeRequiredWhat it does
text string yes The text or link to store in the code.
error_correction string no How much damage the code survives: L about 7%, M 15%, Q 25%, H 30%. Higher levels hold less. One of: L, M, Q, H. Default: "M".
module_size integer no Width of one small square (module) in pixels. Default: 8. From 1 to 40.
margin integer no Blank quiet zone around the code, in modules. Scanners expect at least 4. Default: 4. From 0 to 20.
foreground string no Colour of the dark squares: hex such as #000000, or a basic colour name. Default: "#000000".
background string no Colour behind the code: hex, a basic colour name, or "transparent". Default: "#ffffff".

Examples

A link

Input
{
  "text": "https://setget.net"
}
Result

Different every time. Press the example button above to see one.

High error correction in dark blue

Input
{
  "text": "Table 12",
  "error_correction": "H",
  "foreground": "#1e3a8a",
  "module_size": 6
}
Result

Different every time. Press the example button above to see one.

Questions

How much text fits?
Up to 2,953 bytes at level L and 1,273 at level H. Short content gives a simpler code that scans faster, so prefer a short link.
Does the code expire or track scans?
No. The text is stored in the picture itself. Nothing is redirected or counted.
Why will my code not scan?
Keep strong contrast (dark squares on a light background), leave the margin at 4 or more, and print it large enough: about 2 cm across for a short link. Long text makes dense codes that need more size.