Scan a saved image
Pass encoded bytes to scan_image from a file upload, screenshot or photo. Pick the full profile for artistic QR designs.
QR + barcodes
3
10
MIT
One open-source MIT Rust engine decodes QR images and camera frames into a consistent JSON report carrying detections, parsed payloads and optional QR quality diagnostics, while reading barcodes in the same image.
Drop it into upload flows, live mobile or web camera readers, or pre-print quality checks on clean and stylised QR designs. Just scanning one code now? Open the online QR Code Scanner.
Accepts both saved files and RGBA frames across three profiles: full (deepest preprocessing + score), fast (lighter score) and frame (decode only).
Pass encoded bytes to scan_image from a file upload, screenshot or photo. Pick the full profile for artistic QR designs.
Supply RGBA pixels to scan_frame or use the browser /camera controller while your app handles camera permissions and lifecycle.
Consume detections and parsed payloads in app logic. Full and fast add optional quality diagnostics, while frame omits scoring.
Choose from 10 published SDK packages sharing one decoding engine and JSON report format, including browser JS/TS and Android Kotlin/Java.
Packages and registries verified on 27 November 2026. Browse full cross-language guides in the GitBook SDK documentation and the open-source scanner repository, or try the browser build on GitHub Pages. Go and PHP wrap the local qrscan executable; see the command-line scanner guide.
Plan image capture, WASM initialisation and result states. Expand the snippet below for exact code and install commands.
Your app owns the file input or camera stream, loading indicator and output actions. Initialise WASM once, offer retry on load errors and keep synchronous scan calls off the main thread in a Web Worker.
Handle empty scans separately from decode errors, clear stale output on new attempts and let users choose follow-up actions explicitly. For Vite or Nuxt builds, follow the browser API notes on import.meta.url and serving the .wasm file.
Follow the JavaScript QR code scanner guide for full browser integration steps. Other runtimes have dedicated guides above.
Pick your preferred package manager. Each command installs the identical MIT-licensed WebAssembly package from npm.
Before adding the library to a project, review its open-source licensing guide. To test it online first, launch the Vite starter on StackBlitz, which installs this package and scans locally in your browser.
npm install @qrcode-ai-com/qrcode-barcode-scanner-wasm
Initialise the WebAssembly module once, then pass a browser File into this helper. It returns an array of decoded strings for regular QR code detections, or an empty array when no matching QR code is found.
import init, { scan_image } from "@qrcode-ai-com/qrcode-barcode-scanner-wasm";
await init();
export async function readQrImage(file) {
const bytes = new Uint8Array(await file.arrayBuffer());
const report = scan_image(bytes, "frame", undefined, undefined, 1000);
return report.detections
.filter((detection) => detection.symbology === "qr_code")
.map((detection) => detection.content.text);
}
The frame profile decodes without computing a scannability score. Pass "full" or "fast" instead of "frame" when you need the QR score and diagnostic hints.
Both undefined arguments keep the engine’s default size limits used in the browser demo: 10,000 px per side and 64,000,000 pixels, comfortably covering a typical mobile phone photo up to 48 megapixels. Larger images fail with input error QRS-002 or QRS-003 without resizing. On public-facing servers, set tighter bounds such as the documented 4,096 px and 16,000,000 pixels.
The 1,000 ms work budget is a cap rather than a latency guarantee because image decoding runs before that timer starts.
For a QR code encoding the website URL below, the function returns:
["https://qrcode-ai.com/"]
Direct API, scan report and licence references, or browse every runtime in the GitBook SDK documentation.
A website link, a WiFi configuration and an artistic QR code illustrate returned fields and where the full profile shines.

A URL QR code outputs https://qrcode-ai.com/ in content.text. Pick the full profile when handling stylised or artistic QR codes.

The WiFi sample outputs WIFI:T:WPA;S:Guest-Network;P:Demo-Only-2026;; in content.text alongside parsed network attributes.
Install your runtime’s package, pass image bytes or camera frames and wire the decoded report into your UI.
Add the package matching your web, server or mobile stack. In browsers, initialise WASM once client-side before scanning.
Call scan_image on encoded bytes or scan_frame on RGBA pixels off the UI thread with your chosen profile and budget.
Keep detections, empty scans and exceptions distinct, and let users trigger actions such as copying or opening URLs.
Consume only the fields your flow requires while respecting each field’s meaning: decoded text, parsed payloads and quality diagnostics serve different roles.
See the ScanReport specification for every field and null rule. All 10 language bindings return the identical JSON structure.
Compare QR Code AI against other browser decoders across QR scoring in full/fast profiles, mixed barcode reading and built-in camera helpers.
| Capability | qr-scanner | ZXing Browser | ||
|---|---|---|---|---|
QR decoding | QR codesQR Code AI decodes standard QR codes as well as Micro QR and rMQR. | QR codesjsQR is documented specifically as a QR code decoding library. | QR codesqr-scanner is documented specifically as a browser QR code reader. | QR codesBrowserQRCodeReader and the multi-format reader both handle QR code decoding. |
Barcodes | 1D + 2DThe same package decodes 1D and 2D barcodes including Code 128, EAN/UPC, Data Matrix, PDF417 and Aztec, offering an advantage for mixed labels over QR-only libraries. The QR snippet above filters barcodes out. | QR onlyThe cited jsQR package focuses solely on QR decoding; external barcode decoders fall outside this comparison. | QR onlyThe cited QrScanner API focuses solely on QR decoding; separate libraries or plugins fall outside this comparison. | 1D + 2DBrowserMultiFormatReader handles mixed 1D and 2D barcodes alongside QR codes, an advantage over QR-only tools. Choose the right class, as BrowserQRCodeReader handles QR only. |
Image input | Bytes + RGBAQR Code AI provides scan_image for encoded bytes (PNG, JPEG, WebP, GIF) and scan_frame for RGBA pixels with dimensions, plus the /scan helper for named options. Your app supplies files or frames. | RGBA pixelsjsQR expects a Uint8ClampedArray of RGBA pixels alongside width and height; your code decodes image files or extracts pixels from video frames. | Image sourcesQrScanner.scanImage accepts image, video and canvas elements, ImageBitmap, File/Blob and image URLs (with proper CORS headers for cross-origin URLs). | Image sourcesProvides image-element, image-URL and canvas decoding methods using whichever QR or multi-format reader matches your input. |
Camera controls | Controller + overlayThe /camera and /camera-overlay modules add a capture controller, position tracker and live readout overlay while keeping decoding inside your Worker. User camera permission is still required. | App-managedThe jsQR README leaves video capture entirely to application code; its webcam sample extracts ImageData manually before calling the decoder. | Start / stopQrScanner includes start(), stop() and destroy() helpers around a video element, cutting down camera lifecycle code compared with decoder-only APIs; user permission still applies. | Capture / stopdecodeFromVideoDevice and decodeFromConstraints provide camera capture helpers plus controls.stop(), reducing lifecycle wiring versus decoder-only packages; user permission still applies. |
QR diagnostics | full / fastFull and fast return a 0 to 100 QR scannability score with practical hints whenever a workflow needs diagnostics beyond raw text. Frame skips scoring, null means unjudged and scores never certify printed labels. | Not describedjsQR outputs data, binaryData, chunks, version and location; its cited documentation describes no QR scannability score or hints. | Not describedqr-scanner’s detailed result exposes data and cornerPoints; its cited documentation describes no QR scannability score or hints. | Not describedZXing Browser documentation describes no QR scannability score or hints; format metadata and error-correction fields serve a different purpose. |
Returned data | Text + payloadOutputs each symbol’s symbology, decoded text, raw bytes, recognised structured payloads (such as URLs or WiFi settings) and trace details without ever opening links or connecting to networks. | Text + bytesReturns data, binaryData, chunks, version and location points covering decoded content and geometry rather than a scannability grade. | Text + cornersDetailed mode returns data alongside cornerPoints, while the legacy string-only return remains a separate compatibility path in the cited revision. | Text + metadataReturns decoded text, format, result points and format-specific metadata; attributes like error-correction level are not a scannability grade. |
Green ticks indicate documented advantages for that criterion; plain text is neutral. “Not described” means the cited docs do not mention that capability. Open underlined labels for full scope. This table is not a speed or accuracy benchmark, and diagnostics do not certify printed labels.
Sources: QR Code AI browser WASM API, ScanReport specification, jsQR repository, Nimiq qr-scanner repository and ZXing Browser repository
Supported stacks, camera frames, structured payloads, local execution and licence.
The QR Code Scanner SDK is an open-source MIT software library developers integrate directly into their own apps to decode QR code images and live camera frames. It returns a structured scan report with decoded payloads and optional quality diagnostics while leaving UI, camera permissions and user actions under your app’s control. For instant one-off scanning, use the online QR Code Scanner.
The SDK ships 10 published language and runtime packages: browser JavaScript/TypeScript, Node.js, Rust, Python, Flutter/Dart, Kotlin/Java for Android, Swift for iOS, .NET/C#, Go and PHP. JavaScript and TypeScript share one WebAssembly package, while the CLI is distributed separately. Check each stack’s guide and the open-source scanner repository for full targets.
Yes. The browser package provides scan_image for encoded bytes and scan_frame for raw RGBA pixels with width and height, while /camera and /camera-overlay add a capture controller and live overlay. Your app still requests camera permission, renders loading states and controls when the stream stops.
It parses website URLs, plain text and structured formats such as WiFi credentials, vCard contacts and calendar events. Many real-world codes for PDFs, digital menus, social links or app stores simply encode a URL rather than a distinct symbology. Decoding extracts text and parsed fields without automatically adding contacts, joining WiFi or authorising payments.
It returns a versioned ScanReport JSON object carrying detections, decoded content (symbology, content.text, content.raw), parsed payloads and execution trace metadata. Under full and fast profiles, it also outputs a scannability score and hints where null means unjudged rather than zero. Decoded links stay passive data until your app acts.
Yes. Once loaded, the browser WASM build decodes completely on-device with no QR Code AI account or cloud request. Native packages for Rust, Node.js, Python, .NET, Android, iOS and Flutter execute directly inside your runtime. Because your surrounding app controls storage, analytics and outbound calls, local decoding itself is not an automatic privacy or offline certification.
Yes. Current engine releases and language bindings use the permissive MIT licence, letting you embed, modify and distribute them in open-source or commercial software while keeping copyright and licence notices. Check the open-source licensing guide for retained third-party notices and older release terms.
No. Local SDK decoding needs neither a QR Code AI API key nor generation credits and stays completely separate from the managed creation service. On that platform, free creation limits and Premium govern affected creation features, with the seven-day Premium trial starting upon creating the first dynamic QR code or Smart Link. Directly encoded data never expires, though a hosted destination can go offline and scanning cannot revive it.
Handle an empty detections array as a normal scan result rather than an exception; the QR quick-start helper also returns [] if only non-QR codes appear. Clear any previous result, prompt for a sharper photo with the full code and quiet zone visible, and catch invalid-file or initialisation errors on a separate error path.
Yes. Every SDK package decodes 16 linear and 2D barcode formats alongside QR codes, even in the same image: Code 128, Code 39, Code 93, Codabar, ITF, GS1 DataBar, GS1 DataBar Expanded, Telepen, EAN-13, EAN-8, UPC-A, UPC-E, Data Matrix, Aztec, PDF417 and MaxiCode. See the Barcode Scanner SDK for barcode-specific snippets; retail numbers are identifiers only and require your own database for product lookups.