Open-Source QR Code Scanner SDK

Build local QR code scanning directly into your app. One open-source engine decodes regular and stylised QR codes plus barcodes from saved images or camera frames on-device, with optional scannability scoring.

import init, { scan_image } from
  "@qrcode-ai-com/qrcode-barcode-scanner-wasm";

await init();
const bytes = new Uint8Array(await file.arrayBuffer());
const report = scan_image(
  bytes, "frame", undefined, undefined, 1000
);
const qr = report.detections
  .find(d => d.symbology === "qr_code");

console.log(qr?.content.text);

Example outputhttps://qrcode-ai.com/

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.

npm install @qrcode-ai-com/qrcode-barcode-scanner-wasm

Need to decode a code right now? Open online reader

QR inputs. Decoded output.

  • Decoded from the same image

    QR + barcodes

  • Scanning profiles

    3

  • SDK integration routes

    10

  • Open-source on-device engine

    MIT

A QR code reader SDK for your own software

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.

Decode QR codes from saved images and camera frames

Accepts both saved files and RGBA frames across three profiles: full (deepest preprocessing + score), fast (lighter score) and frame (decode only).

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.

Scan live camera frames

Supply RGBA pixels to scan_frame or use the browser /camera controller while your app handles camera permissions and lifecycle.

Parse the scan report

Consume detections and parsed payloads in app logic. Full and fast add optional quality diagnostics, while frame omits scoring.

Pick the package for your language and runtime

Choose from 10 published SDK packages sharing one decoding engine and JSON report format, including browser JS/TS and Android Kotlin/Java.

Package or source
@qrcode-ai-com/qrcode-barcode-scanner-wasm
Installation
npm install @qrcode-ai-com/qrcode-barcode-scanner-wasm
Details
Published on npm with TypeScript definitions and mirrored on jsDelivr, unpkg and esm.sh. Bundles one portable WASM binary alongside /auto, /scan, /camera, /camera-overlay and /node entry points. Serve the WASM file alongside your app.
JavaScript QR code scanner guide

Package or source
@qrcode-ai-com/qrcode-barcode-scanner
Installation
npm install @qrcode-ai-com/qrcode-barcode-scanner
Details
Published on npm for Node.js 18+, shipping pre-built native binaries for macOS, Linux (GNU and musl) and Windows with TypeScript declarations. Built for server-side decoding.
Node.js QR code scanner guide

Package or source
qrcode-barcode-scanner on PyPI / import qrcode_barcode_scanner
Installation
pip install qrcode-barcode-scanner
Details
Published on PyPI for Python 3.8+, with pre-built wheels for macOS, Linux and Windows so no Rust compiler is required. scan and scan_frame return the scan report as a Python dict.
Python QR code scanner guide

Package or source
qr_barcode_scanner on pub.dev
Installation
flutter pub add qr_barcode_scanner
Details
Published under verified publisher qrcode-ai.com. Supports signed pre-compiled native binaries via cargokit or local builds with Rust and Android NDK r28+. Decodes saved images and raw RGBA camera frames.
Flutter QR code scanner guide

Package or source
qrcode-barcode-scanner on JitPack
Installation
implementation("com.github.qrcode-ai-com:qrcode-barcode-scanner:0.12.2")
Details
Distributed as an Android AAR on JitPack via one Gradle line, covering four Android ABIs with 16 KB memory-page alignment for 64-bit devices. scan returns ScanReport as a JSON string. Not published on Maven Central yet.
Android QR code scanner guide

Package or source
qrcode-barcode-scanner-swift on Swift Package Index
Installation
.package(url: "https://github.com/qrcode-ai-com/qrcode-barcode-scanner-swift.git", from: "0.12.2")
Details
Add via Swift Package Manager and link the QRCodeBarcodeScanner product. SwiftPM fetches the pre-built, checksum-verified XCFramework automatically with no Rust toolchain needed.
iOS QR code scanner guide

Package or source
QRCodeAI.QRCodeBarcodeScanner on NuGet
Installation
dotnet add package QRCodeAI.QRCodeBarcodeScanner
Details
Published on NuGet with pre-built native libraries spanning five desktop and server OS/architecture targets. Call Scanner.Scan for image bytes or Scanner.ScanFrame for RGBA frames.
.NET / C# QR code scanner guide

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.

JavaScript quick start: decode a QR code in the browser

Plan image capture, WASM initialisation and result states. Expand the snippet below for exact code and install commands.

Plan capture, loading and result controls

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.

Decode a selected image

Install the browser package

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

Decode a selected image

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.

JavaScript
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.

Example output

For a QR code encoding the website URL below, the function returns:

JSON
["https://qrcode-ai.com/"]

What your app gets back from a QR code

A website link, a WiFi configuration and an artistic QR code illustrate returned fields and where the full profile shines.

A QR code graphic beside an app result card displaying https://qrcode-ai.com/ as decoded text.

Extract a website URL from a QR image

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

A WiFi QR graphic connected to a result card displaying the sample network name and decoded WiFi string.

Use structured payload fields in your code

The WiFi sample outputs WIFI:T:WPA;S:Guest-Network;P:Demo-Only-2026;; in content.text alongside parsed network attributes.

How to add QR code scanning to your app

Install your runtime’s package, pass image bytes or camera frames and wire the decoded report into your UI.

  1. Step 1

    Install and initialise the right package

    Add the package matching your web, server or mobile stack. In browsers, initialise WASM once client-side before scanning.

  2. Step 2

    Pass image bytes or RGBA frames

    Call scan_image on encoded bytes or scan_frame on RGBA pixels off the UI thread with your chosen profile and budget.

  3. Step 3

    Handle outputs, empty runs and errors

    Keep detections, empty scans and exceptions distinct, and let users trigger actions such as copying or opening URLs.

Understand the scan report fields

Consume only the fields your flow requires while respecting each field’s meaning: decoded text, parsed payloads and quality diagnostics serve different roles.

Fields
detections[].symbology · content.text · content.raw
Meaning
Each detection captures one symbol: its symbology (such as qr_code) and decoded content. Display content.text for readable strings and inspect content.raw whenever exact byte handling matters. The quick-start helper filters strictly for regular QR codes.

Field
detections[].payload
Meaning
Recognised formats cover URLs, WiFi credentials and other structured payloads, depending on engine version and input. Keep content.text alongside parsed fields; parsing never triggers the represented action.

Fields
score · hints · trace.budget_exhausted
Meaning
The frame profile skips scoring altogether. Full and fast can still return null when scoring does not finish in time; treat null as no judgement, never zero. Software diagnostics never certify printed labels or replace a hardware verifier.

Empty result
A valid scan report can hold zero detections, and the quick-start filter also returns an empty array if only non-QR codes exist. Prompt for a clearer image or frame instead of treating it as a crash.
Error
Invalid files (non-image inputs or oversized dimensions), initialisation failures and runtime scan errors follow your package’s error contract. Catch them cleanly and show an actionable retry or input check.

See the ScanReport specification for every field and null rule. All 10 language bindings return the identical JSON structure.

Compare browser QR scanner libraries

Compare QR Code AI against other browser decoders across QR scoring in full/fast profiles, mixed barcode reading and built-in camera helpers.

Browser APIs · versioned sources · QR Code AI column updated 27 November 2026
CapabilityQR Code AIWASM · MITjsQRjsqrqr-scannerNimiqZXing Browser@zxing/browser

QR decoding

QR codes

jsQR is documented specifically as a QR code decoding library.

QR codes

qr-scanner is documented specifically as a browser QR code reader.

QR codes

BrowserQRCodeReader and the multi-format reader both handle QR code decoding.

Barcodes

QR only

The cited jsQR package focuses solely on QR decoding; external barcode decoders fall outside this comparison.

QR only

The cited QrScanner API focuses solely on QR decoding; separate libraries or plugins fall outside this comparison.

1D + 2D

BrowserMultiFormatReader 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

RGBA pixels

jsQR expects a Uint8ClampedArray of RGBA pixels alongside width and height; your code decodes image files or extracts pixels from video frames.

Image sources

QrScanner.scanImage accepts image, video and canvas elements, ImageBitmap, File/Blob and image URLs (with proper CORS headers for cross-origin URLs).

Image sources

Provides image-element, image-URL and canvas decoding methods using whichever QR or multi-format reader matches your input.

Camera controls

App-managed

The jsQR README leaves video capture entirely to application code; its webcam sample extracts ImageData manually before calling the decoder.

Start / stop

QrScanner 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 / stop

decodeFromVideoDevice and decodeFromConstraints provide camera capture helpers plus controls.stop(), reducing lifecycle wiring versus decoder-only packages; user permission still applies.

QR diagnostics

Not described

jsQR outputs data, binaryData, chunks, version and location; its cited documentation describes no QR scannability score or hints.

Not described

qr-scanner’s detailed result exposes data and cornerPoints; its cited documentation describes no QR scannability score or hints.

Not described

ZXing Browser documentation describes no QR scannability score or hints; format metadata and error-correction fields serve a different purpose.

Returned data

Text + bytes

Returns data, binaryData, chunks, version and location points covering decoded content and geometry rather than a scannability grade.

Text + corners

Detailed mode returns data alongside cornerPoints, while the legacy string-only return remains a separate compatibility path in the cited revision.

Text + metadata

Returns 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

QR Code Scanner SDK questions

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.