Open-Source QR Code Scanner SDK

Build QR code decoding directly into your software. One open-source on-device engine reads standard and artistic QR codes alongside barcodes from saved images or camera frames, and scores QR scannability.

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);

Sample outputhttps://qrcode-ai.com/

Scan a saved image

Pass encoded image bytes from a file upload, screenshot or photo into scan_image. Pick the full profile when working with artistic or styled QR codes.

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

Need to decode a QR code immediately? Open online reader

QR images in. Structured data out.

  • Decoded from the same image

    QR + barcodes

  • Scan profiles

    3

  • SDK integration paths

    10

  • Open-source on-device engine

    MIT

An on-device QR code reader SDK for your software

A single open-source MIT Rust engine decodes QR images and live camera frames into one consistent scan report carrying detections, parsed payloads and optional QR quality diagnostics, while decoding barcodes in the same image.

Drop it into upload flows, live camera scanners or pre-print QA checks for standard or artistic QR codes. Just need one scan right away? Try the online QR Code Scanner.

Decode QR codes from saved images and camera frames

Supports both image files and live camera frames with three profiles: full (deepest preprocessing plus score), fast (lighter score) and frame (decode only).

Scan a saved image

Pass encoded image bytes from a file upload, screenshot or photo into scan_image. Pick the full profile when working with artistic or styled QR codes.

Scan live camera frames

Feed RGBA pixels to scan_frame or mount the browser /camera controller. Camera permissions and stream lifecycle stay fully under your app’s control.

Parse the scan report

Consume detections and structured payloads in app code. Full and fast include optional quality diagnostics, while frame omits scoring.

Pick the package for your language and runtime

Select from 10 published SDK packages backed by the same core engine and report schema, from browser JS/TS to Android Kotlin/Java.

Package or source
@qrcode-ai-com/qrcode-barcode-scanner-wasm
Installation
npm install @qrcode-ai-com/qrcode-barcode-scanner-wasm
Details
Available on npm with TypeScript definitions and mirrored on jsDelivr, unpkg and esm.sh. Bundles a portable WASM binary alongside /auto, /scan, /camera, /camera-overlay and /node entrypoints; host the WASM asset with 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
Available on npm for Node.js 18+, bundling prebuilt native addons for macOS, Linux (GNU and musl) and Windows along with TypeScript types. Built for backend image decoding pipelines.
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
Hosted on PyPI for Python 3.8+ with prebuilt binary wheels for macOS, Linux and Windows, requiring zero local Rust setup. Both 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 by verified publisher qrcode-ai.com. Works with signed prebuilt native binaries through cargokit, or local builds using Rust and Android NDK r28+. Handles both encoded 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 via JitPack as a one-line Gradle dependency covering four Android ABIs with 16 KB page alignment for 64-bit targets. Calling scan yields the ScanReport as a JSON string. Not yet available on Maven Central.
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 through Swift Package Manager and link the QRCodeBarcodeScanner product. SwiftPM fetches the checksummed prebuilt XCFramework automatically without needing a Rust toolchain.
iOS QR code scanner guide

Package or source
QRCodeAI.QRCodeBarcodeScanner on NuGet
Installation
dotnet add package QRCodeAI.QRCodeBarcodeScanner
Details
Distributed on NuGet with prebuilt native binaries spanning five desktop and server OS/architecture targets. Use Scanner.Scan for encoded image bytes or Scanner.ScanFrame for RGBA buffers.
.NET / C# QR code scanner guide

Packages and registries checked on 27 November 2026. Cross-language references live in the GitBook documentation and the scanner repository, while a live browser demo runs 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

Set up file input, WASM loading and result display cleanly. Expand the snippet below for exact code and package manager commands.

Wire up capture, loading states and output UI

Your app owns the file picker or camera interface, spinner states and result buttons. Initialise WASM once, provide a retry path if loading fails and offload synchronous scan calls into a Web Worker.

Separate valid empty scans from runtime exceptions, clear outdated results on each new run and let the user decide what action to take next. With Vite or Nuxt, follow the browser API notes on import.meta.url and serving the .wasm file.

Continue to the JavaScript QR code scanner guide for a full browser walkthrough; other runtimes have dedicated guides too.

Decode a chosen image file

Install the browser package

Use your preferred package manager; all three fetch the exact same MIT-licensed WebAssembly package from npm.

Before shipping the library, inspect the licensing guide. To test scanning without local setup, open the Vite example in StackBlitz, which installs this package and decodes locally in your browser.

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

Decode a chosen image file

Initialise the WebAssembly module once, then pass a browser File into this helper. It resolves to an array of decoded strings for standard QR code detections, returning an empty array whenever no matching QR code is present.

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" whenever you also want the QR score and diagnostic hints.

Leaving both dimension arguments undefined applies the engine defaults used by the official browser demo: 10,000 px per side and 64,000,000 total pixels, comfortably covering standard mobile photos up to 48 megapixels. Oversized images are rejected with QRS-002 or QRS-003 rather than downscaled. For public server uploads, pass stricter caps such as the documented 4,096 px and 16,000,000 pixels.

The 1,000 ms budget caps decoding work rather than end-to-end wall time, since image parsing runs before the budget timer starts.

Sample output

Given a QR code encoding the URL below, the helper returns:

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

What your app gets back from a QR code

A link, a WiFi payload and an artistic QR design illustrate the exact report data and when to enable the full profile.

A QR graphic next to an app output panel displaying https://qrcode-ai.com/ as decoded text.

Extract a website URL from a QR image

A URL QR code places https://qrcode-ai.com/ inside content.text. Switch to the full profile for stylised or artistic QR artwork.

A WiFi QR graphic connected to a code panel showing the sample network name and decoded WiFi string.

Read structured payloads straight in code

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

Adding QR scanning to your product in three steps

Install the right package, send an image or camera frame and surface the structured output inside your UI.

  1. Step 1

    Install and initialise your stack’s package

    Add the package matching your web, backend or mobile runtime. In browser apps, load the WASM binary once on the client before decoding.

  2. Step 2

    Send image bytes or an RGBA frame

    Invoke scan_image with encoded bytes or scan_frame with RGBA pixels off the main thread, specifying a profile and time budget.

  3. Step 3

    Handle detections, empty scans and errors

    Branch cleanly on detections, empty results and input errors, leaving actions like copying or visiting URLs to explicit user input.

Reading the scan report structure

Extract the exact fields your app needs without conflating them: decoded text, parsed payload semantics and quality scores answer distinct questions.

Fields
detections[].symbology · content.text · content.raw
Meaning
Each detection records a single decoded symbol: its symbology (like qr_code) and content. Display content.text to users and use content.raw when exact byte fidelity matters. The quick-start snippet keeps standard QR detections.

Field
detections[].payload
Meaning
Recognised formats can expose structured URLs, WiFi credentials or other schemas depending on the engine version and payload. Always retain the decoded text too; parsing never executes the implied action.

Fields
score · hints · trace.budget_exhausted
Meaning
The frame profile skips scoring altogether, and other profiles can omit a judgement if scoring does not complete. Treat null as unscored rather than zero. Software diagnostics never certify print quality or replace hardware verifiers.

Empty result
A valid scan report can hold zero detections, and the quick-start helper also yields an empty list after filtering out non-QR symbologies. Prompt for another image or frame rather than flagging a crash.
Error
Unreadable files, oversized images, initialisation problems and runtime exceptions follow the package’s error contract. Catch them cleanly and show an actionable retry or format hint.

Every field and null rule is documented in the report specification. All 10 packages share this identical JSON contract.

Browser QR scanner libraries compared

See how QR Code AI compares against popular browser decoders on full/fast QR scoring with hints, mixed barcode support and built-in camera helpers.

Browser APIs · pinned revisions · 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 reader.

QR codes

Both BrowserQRCodeReader and the multi-format reader handle QR decoding.

Barcodes

QR only

The referenced jsQR API focuses purely on QR decoding; external barcode packages or integrations are outside this comparison.

QR only

The referenced QrScanner API focuses purely on QR decoding; external libraries or plugins fall outside this comparison.

1D + 2D

BrowserMultiFormatReader handles mixed 1D and 2D symbols, an advantage over QR-only packages when workflows mix QR codes and barcodes. Note that BrowserQRCodeReader itself reads QR codes only.

Image input

RGBA pixels

jsQR expects a Uint8ClampedArray of RGBA pixels plus width and height, so your app handles image decoding or canvas pixel extraction.

Image sources

QrScanner.scanImage handles image, video and canvas elements, ImageBitmap, File/Blob and supported URLs (subject to CORS for cross-origin URLs).

Image sources

The browser API exposes image-element, image-URL and canvas decoders; pair the QR or multi-format reader to your input needs.

Camera controls

App-managed

The jsQR README leaves camera capture entirely to the host app; its webcam sample grabs ImageData manually before calling the decoder.

Start / stop

For live camera flows, QrScanner supplies start(), stop() and destroy() around a video element, reducing boilerplate compared with decoder-only APIs; user permission is still required.

Capture / stop

For live camera flows, decodeFromVideoDevice and decodeFromConstraints include capture helpers and controls.stop(), cutting boilerplate over decoder-only APIs; user permission is still required.

QR diagnostics

Not described

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

Not described

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

Not described

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

Returned data

Text + bytes

Its documented output carries data, binaryData, chunks, version and corner points, covering decoded content and geometry rather than a scannability grade.

Text + corners

With detailed results enabled, output provides data and cornerPoints; the legacy string-only return remains a compatibility option in the cited revision.

Text + metadata

Decoded results include text, format, locator points and format-specific metadata; fields such as error-correction level are not a scannability grade.

Green checks highlight documented advantages for the listed criterion; plain text is neutral. “Not described” indicates the cited docs do not document that feature. Select underlined labels to inspect details. This matrix is not a speed or accuracy benchmark, and diagnostics do not certify printed labels.

Sources: QR Code AI browser API, report specification, jsQR, Nimiq qr-scanner and ZXing Browser

QR Code Scanner SDK: common questions

Language packages, camera capture, report payloads, local execution and licensing.

A QR code scanner SDK is a software library embedded directly inside your own app to decode QR images or live camera frames. QR Code AI’s open-source MIT SDK delivers a structured scan report with decoded payloads and optional quality diagnostics. The SDK runs the decoding engine, while your app controls input capture, UI and user actions. For a ready-to-use browser utility, open the online QR Code Scanner.

The SDK spans 10 published languages and runtimes: 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 the browser WASM package, while the CLI ships as a standalone command. Check your runtime’s dedicated guide and the scanner repository for complete instructions.

Yes. The browser build provides scan_image for encoded file bytes and scan_frame for raw RGBA pixel buffers with dimensions. Its /camera and /camera-overlay entrypoints add a capture controller and live overlay. Your application stays responsible for requesting camera access, loading states and stopping the video stream.

A QR code can encode a URL, plain text or structured formats like WiFi credentials, vCard contacts or calendar entries. Many everyday use cases, including social links, PDFs, menus and app downloads, simply store a web URL. The engine extracts the exact text and a parsed payload whenever recognised, leaving presentation and actions to your app; decoding never adds contacts, joins WiFi or authorises payments automatically.

Every call returns a versioned scan report holding detections, decoded content, parsed payloads and execution trace details. Standard QR entries expose symbology and content.text, while full and fast also attach a quality score and actionable hints. A null score indicates unscored rather than zero, and a decoded URL is plain data rather than an instruction to navigate.

Yes. Once loaded, the browser WebAssembly package decodes purely on the client device without a QR Code AI account or hosted API calls. Similarly, the Rust, Node.js, Python, .NET, Android, iOS and Flutter bindings run inside your own process. Because your host app still governs uploads, logging, persistence and outgoing links, local decoding alone is not a blanket privacy or offline guarantee.

Yes. Current releases of the core engine and every language binding ship under the open-source MIT licence, allowing commercial and proprietary usage, customisation and redistribution provided copyright and permission notices remain intact. Check the licensing guide for retained third-party notices and earlier release terms.

No. Local SDK decoding needs neither a QR Code AI generation API key nor creation credits, as SDK licensing is completely separate from the managed creation service. On the creation platform, free creation limits and Premium apply to affected creation features, with a seven-day Premium trial starting when you create your first dynamic QR code or Smart Link. Directly encoded data never expires after that trial, though a managed destination may stop resolving, and local decoding cannot restore an inactive managed link.

Treat an empty detections list as a normal valid scan result. In the browser quick start, images containing only non-QR codes like barcodes also yield an empty list after filtering. Prompt users for a crisper image or camera frame showing the full symbol and its quiet zone. Catch invalid inputs (unreadable or oversized files) and initialisation exceptions separately, and clear stale output so earlier results never appear under a failed scan.

Yes. The exact same packages decode 16 barcode symbologies: 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, even when mixed with a QR code in one image. The snippets here filter for standard QR codes; check the Barcode Scanner SDK for barcode-focused guides. Keep in mind a retail barcode number is an identifier, so product titles, prices and stock belong in a separate catalogue database.