How does the dual-engine decoder read QR codes in every browser?
Combining the browser’s hardware-accelerated BarcodeDetector interface with a local jsQR Web Worker gives you a free QR code reader and barcode scanner online in any modern browser. When native detection is unavailable or times out, pixel data transfers straight into the background worker for deterministic local decoding.
On startup, this QR code scanner online probes BarcodeDetector.getSupportedFormats() with a 2,500 ms timeout so unsupported platforms fall back immediately without hanging. Before scanning physical badges or screens, you can check your camera, resolution and FPS to confirm sharp focus and lighting.
In browsers that implement the MDN Barcode Detection API (BarcodeDetector), detect() handles multiple symbologies natively on-device. Any browser without native support, including Safari and Firefox, routes RGBA image buffers to everyday.worker.ts automatically.
Native BarcodeDetector with timeout protection
Each detect() call races against a 3,500 ms timeout guard so stalled hardware drivers never freeze the scanner interface. If native detection returns an empty array or throws an error, execution falls through transparently to the Web Worker decoder.
Two-pass jsQR Web Worker fallback and dark-mode inversion
Static images and screenshots first decode at a maximum dimension of 1024 px via an offscreen canvas (willReadFrequently: true) to stay fast on mobile devices. When a dense QR code in a large screenshot misses on the first pass, a second pass automatically retries at 2048 px.
Inside everyday.worker.ts, jsQR runs with inversionAttempts set to attemptBoth so inverted white-on-black codes from dark-mode apps scan cleanly. Transferring the underlying ArrayBuffer keeps the main UI thread responsive throughout decoding.
Decoding Wi-Fi credentials, vCard contacts, and structured payloads
Raw QR strings often pack multiple fields using escape sequences and legacy prefixes rather than plain URLs. A dedicated payload parser (describeQr) inspects each decoded string locally and extracts human-readable labels, copy targets, and safe action buttons.
Contact cards follow the IETF RFC 6350 vCard Format Specification, mapping FN, N, TEL, EMAIL, ORG, and URL properties into clean key-value pairs. When you need to build your own scannable contact card for badges or stationery, generate a vcard qr code offline on the same site.
| Payload prefix | Detected kind | Extracted fields | Primary action |
|---|---|---|---|
WIFI: |
Wi-Fi network | Network, Security, Password, Hidden | Copy password or Copy name |
https:// or http:// |
Link | Website hostname, Full link | Open link (with safety check) |
mailto: or MATMSG: |
To, Subject, Message | Send email (mailto: only) |
|
tel: |
Phone number | Number | Call number |
sms: or smsto: |
Text message | To, Message | Copy recipient number |
BEGIN:VCARD |
Contact | Name, Phone, Email, Company, Website | Copy raw contact payload |
geo: |
Location | Latitude, Longitude | Open map on OpenStreetMap |
BEGIN:VEVENT |
Calendar event | Event, Starts, Ends, Where | Copy raw event payload |
Wi-Fi network parsing with backslash unescaping
Wi-Fi payloads use S: for SSID, T: for security (WPA, WEP, or NOPASS), P: for password, and H: for hidden networks. The field parser honors backslash escapes (\;, \:, \\) so passwords containing punctuation are decoded accurately rather than truncated at the first semicolon.
Contacts, calendar events, coordinates, and messaging
Location payloads starting with geo: split latitude and longitude coordinates and build an OpenStreetMap link at zoom level 16. Pure numeric strings of 8 to 14 digits are labeled Number for retail barcodes, while unrecognized text displays in monospace for quick copying.
Scanning from live camera, dropped photos, or clipboard screenshots
Three input paths cover desktop screenshots, saved photos, and physical labels without installing any app. You can drop PNG, JPG, or WebP files onto the drop zone, paste a clipboard screenshot with Ctrl+V or Cmd+V, or click Scan with camera.
Camera capture relies on the MDN MediaDevices.getUserMedia() API, requesting the rear environment camera by default on phones and tablets. After verifying your printed labels scan reliably, you can create fresh codes using the QR code generator in your browser.
Tip: On desktop computers, take a region screenshot straight to your clipboard and press
Ctrl+VorCmd+Vanywhere on this page to decode it without saving a temporary image file first.
Clipboard paste and multi-image drag-and-drop
A window-level paste listener watches for clipboard image files and passes them straight to createImageBitmap() for decoding. Dropping multiple files processes each image sequentially and closes every ImageBitmap immediately in a finally block to keep memory usage flat.
Live camera polling and multi-camera switching
When live scanning starts, a timer polls the video element every 280 ms and deduplicates results so the same code is not added repeatedly. On phones, a 60 ms vibration (navigator.vibrate(60)) confirms each new detection, and a Camera selector lets you switch lenses whenever multiple video inputs are present.
Why are scanned QR links checked before opening?
QR codes hide their destination URL behind black-and-white modules, making it easy for printed stickers or phishing emails to disguise malicious domains. Using a QR code reader with link safety preview prevents accidental redirects to credential harvesters or spoofed login pages.
The link inspector parses http:// and https:// targets against standard authority rules defined in IETF RFC 3986 Uniform Resource Identifier (URI) Syntax. It flags three common tricks: @ userinfo prefixes that mask the real host, xn-- punycode domains that mimic familiar letters, and bare IPv4 or IPv6 addresses.
Every Open link button in this QR reader uses rel="noopener noreferrer nofollow" and opens in a new tab only when you choose to click it. If a screenshot contains readable text alongside a code, you can also extract printed copy with browser-based image to text locally before closing the tab.