Open-Source QR Code Scanner SDK

Embed QR code reading directly into your own app. One open-source engine decodes standard and artistic QR codes alongside barcodes from an image or camera frame on the user’s device, and scores how reliably each QR code scans.

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 an image

Pass encoded image bytes to scan_image from an upload, screenshot or photo. For stylised or artistic QR codes, use the full profile.

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

Need to scan a code straight away? Open the online reader

QR inputs. Decoded content.

  • Decoded in the same image

    QR + barcodes

  • Scan profiles

    3

  • SDK integration paths

    10

  • Open-source on-device engine

    MIT

A QR code reader SDK built for your application

One open-source, MIT-licensed Rust engine decodes QR images and camera frames into a consistent scan report with detections, parsed payloads and optional QR quality diagnostics, whilst reading barcodes in the same image.

Use it for image uploads, live camera readers or pre-print QR checks on standard or artistic codes. Need a quick single scan straight away? Open the online QR Code Scanner.

Read QR codes from images and camera frames

Processes images and camera frames across three profiles: full (deepest pre-processing + score), fast (lighter score) and frame (decode only).

Scan an image

Pass encoded image bytes to scan_image from an upload, screenshot or photo. For stylised or artistic QR codes, use the full profile.

Scan camera frames

Pass RGBA pixels to scan_frame or wire up the browser /camera controller. Your app manages camera permissions and lifecycle.

Inspect the scan report

Read detections and parsed payloads for your application logic. Full and fast include optional quality diagnostics; frame skips scoring.

Choose a package for your language and runtime

Select from 10 published SDK integrations built on one shared engine and report format, including JS/TS for browsers and Kotlin/Java for Android.

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 declarations and also served via jsDelivr, unpkg and esm.sh. Bundles one portable WASM module alongside /auto, /scan, /camera, /camera-overlay and /node entry points. Serve the WASM asset alongside your application.
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 and later, shipping pre-built native binaries for macOS, Linux (GNU and musl) and Windows along with TypeScript declarations. Built for server-side image processing.
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 and later, with pre-built wheels for macOS, Linux and Windows so no Rust toolchain is required. Both scan and scan_frame return the scan report as a 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 the verified publisher qrcode-ai.com. Supports signed pre-compiled native libraries via cargokit or local builds using Rust and Android NDK r28+. Decodes encoded images as well as 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
Published as an Android library on JitPack with a single-line Gradle dependency, four Android ABIs and 16 KB memory-page alignment for 64-bit targets. Calling scan returns the ScanReport as a JSON string. Not currently published 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
Install through Swift Package Manager and link the QRCodeBarcodeScanner library product. SwiftPM fetches the pre-built, checksummed XCFramework automatically, with no Rust toolchain required.
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 covering five desktop and server OS/architecture targets. Call Scanner.Scan for encoded image bytes or Scanner.ScanFrame for RGBA pixels.
.NET & C# QR code scanner guide

Packages and registries verified on 27 November 2026. Full cross-language documentation lives in the GitBook documentation and the scanner repository, and you can try the browser build directly on GitHub Pages. Both the Go and PHP packages drive the installed qrscan binary; the QR Code Scanner CLI has its own guide.

JavaScript quick start: read a QR code in the browser

Plan input capture, WASM loading and result handling. Expand the image example below for the exact code and installation commands.

Prepare capture, loading and result controls

Your application provides the file picker or camera capture, loading state and result controls. Initialise WASM once, recover from initialisation failures with an explicit retry and keep synchronous scan calls inside a Web Worker.

Handle an empty result separately from a scan error, clear stale output and let users decide the next action. With Vite or Nuxt, follow the browser API guidance for import.meta.url and serving the WASM asset.

Follow the JavaScript QR Code Scanner SDK guide for the full browser workflow. Other languages and runtimes have their own guides.

Read a selected image

Install the browser package

Pick one package manager. All three commands install the same MIT-licensed WebAssembly package from npm.

Before integrating the engine, review its licensing guide. To try the scanner first, open the Vite example on StackBlitz: it installs this package and scans directly in your browser.

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

Read a selected image

Initialise the WebAssembly module once, then pass a browser File to this function. It returns an array of decoded strings for standard QR code detections. An image containing no matching QR code returns an empty array.

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 scannability scoring. To receive the QR score and its hints as well, pass "full" or "fast" instead of "frame".

The two undefined arguments keep the image size limits at the engine’s defaults, matching the scanner’s own browser example: 10,000 px per side and 64,000,000 pixels. An ordinary mobile phone photo, up to 48 megapixels, stays comfortably within those bounds. Any image exceeding either limit is refused with an input error (QRS-002 or QRS-003): it is not resized. On a server accepting uploads from the public, pass lower limits: the scanner’s documentation uses 4,096 px and 16,000,000 pixels.

The 1,000 ms work budget is a configuration setting rather than an end-to-end response-time guarantee: image decoding finishes before that budget starts.

Example output

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

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

What your application receives from a QR code

A URL, a WiFi code and an artistic QR code illustrate what the scanner returns and where the full profile makes a difference.

A QR code image beside an application result panel displaying https://qrcode-ai.com/ as decoded text.

Extract the website address from a QR image

A URL QR code returns https://qrcode-ai.com/ in content.text. Choose the full profile for stylised or artistic QR designs.

A WiFi QR image linked to a code panel displaying the example network name and decoded WiFi credentials.

Keep structured content ready for your code

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

How to add QR scanning to your product

Choose your runtime, supply an image or camera frame and surface the decoded report in your interface.

  1. Step 1

    Install and initialise the matching package

    Install the package for your browser, server or mobile stack. On the web, load WASM once on the client before scanning.

  2. Step 2

    Pass image bytes or a pixel frame

    Send image bytes to scan_image or RGBA pixels to scan_frame off the UI thread, specifying a scan profile and work budget.

  3. Step 3

    Handle content, empty results and errors

    Treat detections, empty outcomes and errors separately, and let users choose actions such as copying text or opening a link.

Understand the scan report

Read the fields your workflow requires whilst preserving their meaning. A decoded value, a parsed payload and a quality judgement each answer a different question.

Fields
detections[].symbology · content.text · content.raw
Meaning
Each detection represents one decoded symbol: its symbology (the code type, such as qr_code) and its content. Use content.text for display and the documented raw-content representation whenever byte-level handling matters. The quick-start filter retains standard QR code detections.

Field
detections[].payload
Meaning
Recognised content can include a URL, WiFi settings or other structured data. Payload classification depends on the engine version and content. Retain the decoded text as well; parsing never carries out the action described by the data.

Fields
score · hints · trace.budget_exhausted
Meaning
The frame profile skips scoring altogether. Other profiles may return no judgement if the scoring pass does not finish. Treat null as no score rather than zero. Software diagnostics do not certify printed labels or replace a hardware verifier.

Empty result
A valid scan report can return zero detections. The quick-start helper can also return an empty array once non-QR symbologies are filtered out. Prompt for another image or frame rather than treating that outcome as a software failure.
Error
Invalid inputs (an unreadable file or an image exceeding the size limits), initialisation failures and other scan errors follow the installed package’s error contract. Catch them and offer a clear retry or input adjustment.

The report specification defines every field and its null semantics. The JSON structure is identical across every package.

Compare browser QR scanner libraries

Compare QR Code AI against other browser decoders: QR scores and hints in full/fast profiles, mixed barcode decoding and a built-in camera controller.

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 as a QR decoding library.

QR codes

qr-scanner is documented as a browser QR reader.

QR codes

BrowserQRCodeReader and the multi-format reader handle QR decoding.

Barcodes

QR only

The cited jsQR library and API cover QR decoding only. This comparison does not extend its scope to other barcode decoders or integrations.

QR only

The cited QrScanner API covers QR decoding only. This comparison does not extend its scope to other libraries or add-ons.

1D + 2D

BrowserMultiFormatReader handles mixed 1D/2D input, an advantage over QR-only libraries for workflows combining QR codes and barcodes. Select the right reader: BrowserQRCodeReader itself is QR-specific.

Image input

RGBA pixels

jsQR takes a Uint8ClampedArray of RGBA pixels alongside width and height. Your application decodes a saved image or extracts pixels from a camera frame.

Image sources

QrScanner.scanImage accepts image, video and canvas elements, ImageBitmap, File/Blob and supported image URLs. Cross-origin image URLs require appropriate CORS access.

Image sources

The browser API offers image-element, image-URL and canvas decoding methods. Pick the QR or multi-format reader suited to your input.

Camera controls

App-managed

The jsQR README explicitly leaves platform-specific capture to the host application. Its webcam example extracts ImageData before calling the decoder.

Start / stop

For camera integration, the documented QrScanner API provides start(), stop() and destroy() around a video element. This reduces capture and lifecycle wiring compared with decoder-only APIs; user permission is still required.

Capture / stop

For camera integration, decodeFromVideoDevice and decodeFromConstraints provide capture helpers alongside controls.stop(). This reduces capture and lifecycle wiring compared with decoder-only APIs; user permission is still required.

QR diagnostics

Not described

The jsQR result exposes data, binaryData, chunks, version and location. Its documentation describes no QR scannability score or hints.

Not described

The qr-scanner detailed result exposes data and cornerPoints. Its documentation describes no QR scannability score or hints.

Not described

The ZXing Browser documentation describes no QR scannability score or hints. Format metadata and error-correction information are separate data.

Returned data

Text + bytes

The documented result holds data, binaryData, chunks, version and location points. These represent decoded content and geometry rather than a documented scannability grade.

Text + corners

With the documented detailed-result API, the result holds data and cornerPoints. The older string-only return value remains a separate compatibility path in this source revision.

Text + metadata

The decoding result carries text, format, result points and format-dependent metadata. Metadata such as the error-correction level is not a QR scannability grade.

Green ticks mark documented advantages for the stated criterion; plain text is neutral. “Not described” means the cited documentation does not describe the capability. Open underlined labels for details. This table 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 questions

Packages, camera integration, decoded data, local processing and licensing.

A QR code scanner SDK is a software library that developers embed in their own applications to decode QR images or camera frames. QR Code AI’s open-source MIT-licensed SDK returns a structured scan report with decoded content and optional quality diagnostics. It provides the decoding engine; your application supplies the camera or file input, user interface and follow-up actions. For ready-to-use scanning directly in your browser, use the online QR Code Scanner.

The SDK supports 10 published languages and runtimes across web, server and mobile platforms: 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 browser WebAssembly package, whilst the QR Code Scanner CLI is available separately for command-line workflows. Open the guide for your target stack or browse the scanner repository for full technical details.

Yes. It decodes both still images and live camera frames. The browser package exposes scan_image for encoded image bytes and scan_frame for RGBA pixels with their width and height. Its /camera and /camera-overlay entry points add a capture controller and a live selection overlay. Your application still requests camera permission, manages loading states and decides when to stop the camera.

A QR code can store a website address, plain text or structured data such as WiFi credentials, contact details or calendar events. Many generator use cases, including social profiles, PDFs, menus and app downloads, encode a URL rather than a distinct QR format. The engine returns the decoded content alongside a parsed payload whenever the structure is recognised. Your application decides how to display or act on it; scanning never imports contacts, joins WiFi networks or authorises payments automatically.

The SDK returns a versioned scan report containing detections, decoded content, parsed payload fields and trace metadata. Each standard QR detection exposes its symbology and content.text, whilst the full and fast profiles also add a 0 to 100 scannability score and actionable hints. A null score indicates no judgement rather than a score of zero, and a decoded URL is plain data rather than an instruction to open a website.

Yes, with no account needed. Once its files load, the browser WebAssembly build decodes entirely on your device without a QR Code AI login or hosted decoding request. The Rust, Node.js, Python, .NET, Android, iOS and Flutter packages likewise execute locally wherever your application runs them. Because your host application controls uploads, analytics, storage and outbound requests, the SDK’s local decode path is not a blanket privacy or offline guarantee.

Yes. Current releases of the scanner engine and language bindings are open source under the MIT licence, permitting use, modification and redistribution in both open-source and proprietary commercial projects provided you retain the copyright and permission notices. Check the licensing guide for retained third-party notices and the terms shipped with earlier releases.

No. Local SDK decoding needs neither a QR Code AI generation API key nor QR creation credits, and SDK licensing is entirely separate from the managed creation platform. On that platform, free creation limits and Premium apply to the affected creation features; the seven-day Premium trial begins with your first dynamic QR code or Smart Link. Directly encoded data does not expire after that trial, although a managed destination can become unavailable, and decoding cannot restore an unavailable destination.

Treat an empty detections array as a valid scan outcome rather than a crash. In the quick-start example, a symbol of another type, such as a barcode, also yields an empty array once the QR filter runs. Prompt the user for a sharper image or a fresh frame with the full code and its blank margin clearly visible. Catch invalid inputs (an unreadable file or an image exceeding the size limits) and initialisation or scan exceptions separately, and clear previous output so an older result is never shown as if it belonged to a new unsuccessful scan.

Yes. The same packages decode both 1D and 2D barcodes across these formats: 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. They can also decode a barcode and a QR code from the same image. The examples on this page filter for standard QR code detections; visit the Barcode Scanner SDK guides for barcode examples. A decoded retail number is an identifier only; product names, prices and stock levels require a separate catalogue or database.