Generate QR codes from any text or URL, and decode QR code images back to text. Free, no dependencies, works in the browser.
import { qr } from 'toolmetry';| Function | Parameters | Returns | Description |
|---|---|---|---|
qr.generate | text: string, size?: number | string | Generate a QR code image URL from text |
qr.decode | imageUrl: string | Promise<string> | Decode a QR code image URL back to text |
import { qr } from 'toolmetry';
const qrUrl = qr.generate('https://toolmetry.pro');
// Returns QR code image URL
const qrLarge = qr.generate('https://toolmetry.pro', 512);
// Returns a larger 512x512 QR codeimport { qr } from 'toolmetry';
const decoded = await qr.decode('https://example.com/qr-image.png');
// Returns the text/URL encoded in the QR codeimport { qr } from 'toolmetry';
const qrUrl = qr.generate('Hello, World!');
// Returns QR code image URL