← Media & Codes

QR Code Generator

Generate QR codes in your browser. Nothing leaves your device.

Enter text or URL

QR Code

Your QR code will appear here once you enter text or a URL.

Use this tool from AI agents

This tool's engine is available to AI agents over MCP as generate_qr. Add the Clean.tools server, then your agent can call it directly.

Claude Code
claude mcp add --transport http clean-tools https://mcp.clean.tools/mcp
Claude Desktop (mcpServers)
{"mcpServers":{"clean-tools":{"command":"npx","args":["-y","@clean-tools/mcp"]}}}
Cursor
https://mcp.clean.tools/mcp

Or call it over plain HTTP from any script. Same engine, JSON in and JSON out, no key:

curl
curl -s https://api.clean.tools/v1/generate_qr \ -H 'content-type: application/json' \ -d '{"text":"https://clean.tools","moduleSize":10,"quietZone":4}'
JavaScript
const res = await fetch("https://api.clean.tools/v1/generate_qr", { method: "POST", headers: { "content-type": "application/json" }, body: JSON.stringify({ text: "https://clean.tools", moduleSize: 10, quietZone: 4 }) }); const data = await res.json();

How it works

This QR code generator encodes your text or URL into a QR code entirely in your browser using a self-contained implementation of the QR code standard. The algorithm handles byte-mode encoding, Reed-Solomon error correction (level M), matrix construction with finder and alignment patterns, and automatic mask selection for optimal readability.

Your data is never sent to a server. The QR code is rendered to an HTML Canvas element and can be downloaded as a PNG image. It supports text up to about 200 characters and works on any modern browser, on both mobile and desktop.

If you need the same encoding from scripts or AI agents, the qr-generator API exposes the generate_qr tool over the Clean.tools REST endpoint and as an MCP server, or you can install the @clean-tools/mcp package from npm.

Frequently asked questions

How much text can one QR code hold here?

This generator encodes byte mode across QR versions 1 through 10, so the practical limit is about 213 bytes at error correction level M. Multibyte characters such as emoji or accented letters use several bytes each, so they reach the limit sooner than plain ASCII. Text past the limit shows a warning instead of a code.

Which error correction level do these codes use?

Every code is built at level M, which recovers roughly 15 percent of the data if part of the code is dirty, scratched, or partly covered. That is a good balance for screens and printed labels, though it is not high enough to reliably survive a large logo placed in the center.

Can I make QR codes for Wi-Fi, email, or a phone number?

Yes. Type the raw string that scanners understand, such as tel:+15551234567, mailto:you@example.com, or a Wi-Fi string like WIFI:S:MyNetwork;T:WPA;P:mypassword;;. The generator encodes the exact text you enter, and the scanning app decides how to act on it.

Is anything I type uploaded or saved?

No. Encoding, mask selection, and PNG rendering all run in your browser with a self-contained implementation, so the text never leaves your device and nothing is stored after you close the tab.

Can I use this from the command line or an AI agent?

Yes. The same engine is available over a REST endpoint at https://api.clean.tools/v1/generate_qr, so you can generate codes from a shell script or any language with an HTTP client. It also runs as an MCP server you can add to Claude, Claude Code, or Cursor, letting an agent call it directly. To run it locally, install the @clean-tools/mcp package from npm, which starts it as a stdio server.

More tools from Clean.tools

View all tools

Use Clean.tools from your AI agent

This tool is also generate_qr on the Clean.tools MCP server — the same engine, callable by your AI agent directly. No key, no signup: requests are processed in memory and request contents are never stored.

Claude Code
claude mcp add --scope user --transport http clean-tools https://mcp.clean.tools/mcp
Any MCP client (streamable HTTP, authless)
https://mcp.clean.tools/mcp

Every tool, the REST API, and setup for Cursor, Claude Desktop, VS Code & more →