Pick your platform
Same symbology ids, options and result format everywhere.
iOSSwiftbetaAndroidKotlinbetaJavaScriptTypeScriptReact NativeTypeScriptbetaCordovaJavaScriptguideXamarinC#guideFlutterDartbeta.NETC#betaCapacitorTypeScriptTitaniumJavaScriptguideLinuxPython · NodeReactTypeScriptVueTypeScriptAngularTypeScriptSvelteTypeScriptNext.jsTypeScriptElectronTypeScriptTauriTypeScriptguideNode.jsTypeScriptPythonPythonbetaREST APIHTTP
Get started
- IntroductionQRGen is an open-source (Apache-2.0) SDK for scanning barcodes, QR codes and ID documents, and for generating and parsing barcodes, on the web, mobile, desktop and server.
- Quick startAdd a working barcode and QR code scanner to a web page in under 15 lines, with a script tag, npm and a web component, or React.
- InstallationInstall QRGen from npm, a tarball or the CDN, self-host the WebAssembly engine, configure Content Security Policy and bundlers, and check browser support.
- Agent SkillsInstall QRGen's Agent Skills so Claude Code, Cursor, Codex, Copilot and other coding agents can integrate barcode scanning correctly on the first try.
- Core conceptsSymbologies and groups, scan modes, the Barcode result object, duplicate filtering, scan areas, feedback, worker decoding and privacy in QRGen.
Web
- JavaScriptScan barcodes from the camera with the BarcodeScanner API and your own video element, decode images with scanImage, and generate barcodes, in plain JavaScript or TypeScript.
- Web ComponentsReference for the <qrgen-scanner> and <qrgen-barcode> custom elements: attributes, properties, methods, events, CSS custom properties, parts and sizing.
- Script tag & CDNUse QRGen without a build step: load the ES module or classic-script bundle from the CDN, use the elements and the global QRGen object, and self-host the files.
- ReactUse the QRGenScanner and QRGenBarcode React components: props, event callbacks, the imperative ref handle, and server-side rendering notes.
- Next.jsAdd a QRGen barcode scanner to a Next.js App Router or Pages Router app with a client component, next/dynamic, self-hosted wasm and server-side scanning in route handlers.
- Vue & NuxtUse the QRGenScanner and QRGenBarcode Vue 3 components or QRGenPlugin, handle scan events, render on the client in Nuxt, and configure custom elements.
- AngularUse the <qrgen-scanner> and <qrgen-barcode> custom elements in Angular with CUSTOM_ELEMENTS_SCHEMA, event and property bindings, and zone-aware setup.
- Svelte & SvelteKitUse the <qrgen-scanner> element in Svelte 5 and Svelte 4, handle scan events, and load the SDK on the client in SvelteKit.
Mobile & desktop
- iOS & macOS (Swift)Scan barcodes and QR codes in iOS and macOS apps with QRGenKit: SwiftUI and UIKit scanner views on AVFoundation and Apple Vision, image scanning, generation and parsers.
- Android (Kotlin)Scan barcodes and QR codes in Android apps with QRGen: a CameraX + ML Kit scanner view, a Jetpack Compose component, image scanning, generation and parsers.
- React NativeScan barcodes in React Native and Expo apps with qrgen-react-native: native scanning on VisionCamera, or a zero-setup WebView scanner.
- FlutterScan barcodes in Flutter apps with qrgen_flutter: a mobile_scanner-based widget and a WebView scanner that reads every QRGen symbology.
- Capacitor & IonicScan barcodes in Capacitor and Ionic apps with the QRGen web SDK: camera permissions on iOS and Android, secure contexts, live reload over HTTPS and offline wasm.
- CordovaScan barcodes in Apache Cordova apps with the QRGen web SDK: Android runtime camera permission, NSCameraUsageDescription via config.xml, WKWebView settings and offline wasm.
- ElectronScan barcodes in Electron apps: camera permission handlers, macOS camera access and NSCameraUsageDescription, offline wasm, and file scanning in the main process.
- TauriScan barcodes in Tauri 2 apps with the QRGen web SDK: camera permissions in the system WebView on macOS, Windows and Linux (WebKitGTK), CSP and offline wasm.
- TitaniumA WebView-based guide for Titanium apps: load the hosted QRGen embed page in Ti.UI.WebView and receive scan events through an injected bridge or polling.
- .NET, MAUI & XamarinQRGen.Net for .NET: GS1/AAMVA/content parsers, a REST client, local encode/decode with ZXing.Net, and a .NET MAUI camera scanner page.
Server & Linux
- Node.jsDecode barcodes in image files and buffers and generate barcode PNG and SVG files in Node.js with qrgen-sdk/node, including serverless deployment notes.
- CLIScan, generate and parse barcodes from the command line with the qrgen CLI, and start the REST API server. Commands, flags, JSON output, stdin and exit codes.
- REST API & DockerScan, generate and parse barcodes from any language over HTTP with qrgen serve or the Docker image: endpoints, curl examples, errors, CORS, framework mounting and client code.
- PythonScan images and webcams, generate barcodes, parse GS1 and driver licenses, and run the REST API with the qrgen-sdk Python package.
- Linux & Raspberry PiScan barcodes on Linux servers, desktops and Raspberry Pi: the Node CLI, the REST API and Docker, Python with OpenCV webcams, and a Chromium kiosk running the web scanner.
Features
- Barcode scanningScan barcodes and QR codes from the camera: single and continuous modes, symbology choice, viewfinders, scan areas, duplicate filtering, feedback, torch and zoom.
- Batch scanningScan and track many barcodes at once with batch mode: track events, TrackedBarcode ids, an accessible selection list, counts of codes in view, and BarcodeTracker for custom interfaces.
- ID scanningRead the PDF417 barcode on North American driver licenses and ID cards and parse it with parseAAMVA: fields, age verification, privacy guidance and limitations.
- Image scanningDecode barcodes and QR codes in images with scanImage: file inputs, drag and drop, clipboard paste, URLs, canvases and video frames, multiple codes per image, and tryHarder.
- Barcode generationGenerate QR codes and 25 other barcode types as SVG, PNG or data URLs with generate(), <qrgen-barcode>, the CLI and the REST API, including GS1 data.
- QR print planningPlan a QR code for a physical print size, build common payloads and verify exported files.
- ParsersTurn scanned text into structured data with parseContent (URLs, Wi-Fi, contacts, events, payments, product codes, GS1, driver licenses), parseGS1 and parseAAMVA.
- Embed bridgeRun the QRGen scanner in any WebView or iframe with the hosted embed page, its message bridge and host commands, or self-host it with qrgen-sdk/bridge.
- UI customizationRestyle the <qrgen-scanner> element with the accent color, CSS custom properties and shadow parts, or build a fully custom scanner UI on BarcodeScanner.
Reference
- JavaScript APIReference for every export of the qrgen-sdk package: scanning, camera, generation, parsers, symbologies, engine configuration, utilities and errors, with TypeScript signatures.
- SymbologiesAll 26 barcode symbologies QRGen reads and writes, with ids, aliases, groups, and per-platform support for the web, Node.js, Python, iOS (Apple Vision) and Android (ML Kit).
- Options, events & errorsReference tables for QRGen scanner options and their element attributes, BarcodeScanner and element events with payloads, and every error code with its causes and fixes.
- TroubleshootingFix common QRGen problems: the camera does not start, black video on iOS, slow scanning, codes not found, CSP warnings, blocked wasm and SSR errors.
- FAQAnswers to common questions about QRGen: licensing, privacy, offline use, browser and platform support, bundle size, ID documents and commercial SDKs.
- Migrating from other SDKsMove to QRGen from html5-qrcode, @zxing/browser and @zxing/library, QuaggaJS and quagga2, or a commercial SDK such as Scandit, with side-by-side API and concept mappings.
- Credit and attributionHow to credit QRGen when you use it: what the Apache License 2.0 requires, where the NOTICE goes on each platform, a Powered by QRGen badge and how to cite the project.