ForgeSworn QR

QR 0.3.14 · MIT · No runtime dependencies

QR codes that your application controls

Generate, render and read QR codes with one dependency-free TypeScript package. Add WebAssembly for faster decoding, or use plain JavaScript. Keep your camera interface, your pixels and your deployment under your control.

npm install @forgesworn/qr
import { encode, toSvg, decode } from '@forgesworn/qr'

const svg = toSvg(encode('https://example.com/'))
const result = decode(imageData) // RGBA or greyscale pixels
if (result) console.log(result.text)

Installation, recipes and API · Why choose QR? · Benchmarks and accuracy · GitHub · npm

Useful from the first import

The library does not open a camera, upload frames or require a hosted service. Your application supplies pixels and decides what to do with the result.

Accuracy is the priority

The recorded WASM comparison correctly reads 180 of 184 photographs, against ZXing-WASM's 171, and 172 of 224 synthetic stress frames, against 150. The latter set reports no wrong payloads and no false reads on 32 negative controls. These results describe the named datasets; they are not a guarantee for every image or device. Read the comparison and its limitations.

Pick the right tool

QR is a good fit for applications that need QR generation and pixel decoding without a runtime dependency tree or a prescribed UI. It reads ordinary QR Code Model 2, one result per call. Choose a broader barcode library if you need other symbologies, or a camera wrapper if you want a complete scanning interface.

Documentation and distribution