BrowserTools
Advertisement
Home / Generators / QR Code Scanner

QR Code Scanner

Scan QR codes from your camera or an uploaded image, entirely in your browser.

Loading QR Code Scanner… If nothing happens, please enable JavaScript.

Frequently asked questions

Are scanned images or camera frames uploaded to a server?
No. All decoding happens locally inside your browser. When you upload an image file, it is read directly from your device's memory using the File API and passed to the browser's decoding engine. Camera frames are processed in the browser's graphics pipeline and never leave your device. No data is logged or stored.
How does the BarcodeDetector API work technically?
The BarcodeDetector API is a browser-native interface that accepts an image source — an HTMLImageElement, HTMLCanvasElement, ImageBitmap, or Blob — and returns a Promise resolving to an array of detected barcode objects, each with a rawValue string and a boundingBox. Under the hood it delegates to the operating system's image analysis frameworks: Vision.framework on macOS/iOS and ML Kit on Android, so detection speed and accuracy match the native camera app.
Which browsers and barcode formats are supported?
Chromium-based browsers (Chrome, Edge, Opera) on desktop and Android support BarcodeDetector and can decode QR, Aztec, Code 128, Code 39, Code 93, Codabar, Data Matrix, EAN-8, EAN-13, ITF, PDF417, and UPC-A/E barcodes. Safari 17 on macOS and iOS 17 added support. Firefox does not implement BarcodeDetector; the tool will display a browser compatibility notice and use a JavaScript fallback.
What permission does the browser ask for when using the camera?
The browser shows a standard camera permission prompt the first time you activate live scanning. This is required by the `getUserMedia` specification and cannot be bypassed. You can revoke the permission at any time in your browser's site settings. The tool requests only video — no audio — and stops the camera stream as soon as you close or navigate away from the scanner.
Can I scan a QR code from a screenshot or image on my computer?
Yes. Click the Upload Image button, select any PNG, JPEG, or WebP file from your device, and the tool will attempt to decode all barcodes in the image. This is particularly useful for QR codes received in emails or screenshots, where pointing a phone camera at a screen is awkward.
Why does the scan sometimes fail on a valid QR code?
Common causes are JPEG compression artefacts blurring module edges, low contrast between the dark modules and background, a code that is too small in the image frame, rotation beyond 45 degrees on some decoders, or physical damage obscuring more than the error-correction level allows. Try opening the image in a photo editor to increase contrast and sharpness, then re-upload.
How is this different from just using my phone camera?
Your phone camera is the easiest option for physical codes in the real world. This tool is faster for digital QR codes — images on your screen, in email attachments, in PDFs — where pulling out your phone and pointing it at the screen is slower and less accurate than simply uploading the file. It also lets you inspect a QR code's content before opening the URL, which is a useful safety check.
Can I use this to verify a QR code I just generated?
Yes, and this is good practice. After generating a QR code, download the image and upload it here to confirm it decodes to the exact URL or data you intended. This catches errors like encoding the wrong protocol (http vs https) or accidental whitespace in the input that might make the code scan but redirect incorrectly.
Is it safe to scan an unknown QR code with this tool?
The tool decodes the raw content and displays it as text before you take any action. This is safer than scanning directly with a phone camera, which typically opens URLs automatically. You can inspect the decoded URL, check it for suspicious domains or redirects, and decide whether to visit it, copy it, or discard it.
Does the tool work on mobile browsers?
Yes. On Android, Chrome supports BarcodeDetector natively, so camera-based scanning is available. On iOS, Safari 17 or later supports the API. The file upload path works on all mobile browsers. For live camera scanning on mobile, pointing your device's default camera app at a physical code is typically more convenient, but the browser-based tool is useful when decoding a QR code visible on the same screen.

About QR Code Scanner

QR codes encode URLs, contact cards, Wi-Fi credentials, payment information, and arbitrary text in a compact two-dimensional barcode that any smartphone camera can read in under a second. But what if you need to decode a QR code from a screenshot, an image file, or a secondary display — without pulling out your phone? Modern browsers now expose the BarcodeDetector API, a native interface that processes image data locally on the device, making fully browser-based QR scanning possible without any server upload or third-party app.

The use cases for a browser-based QR scanner are broader than they might first appear. Developers frequently encounter QR codes in documentation, design mockups, authentication flows, and test environments where scanning with a phone is inconvenient. IT professionals verify QR-encoded Wi-Fi credentials before deploying signage. Security researchers inspect QR codes in phishing campaigns safely — decoding the URL without clicking it. Content creators and marketers decode competitors' QR codes to see where they redirect. Anyone who receives an image with a QR code embedded can drop it into this tool and read the content instantly.

The tool uses two decoding paths depending on browser support. In Chromium-based browsers (Chrome 88+, Edge 88+, Opera 74+) and Safari 17+, it uses the native `BarcodeDetector` API, which hands raw image data to the browser's built-in decoding engine — the same engine used by the OS camera app. In browsers that do not support `BarcodeDetector`, it falls back to a JavaScript implementation. In both cases, image data is processed entirely on your device; nothing is uploaded to any server. For the camera mode, the tool uses the `getUserMedia` API to access your webcam stream, processes frames locally, and stops the stream the moment you navigate away.

For best results when uploading an image, use a high-contrast version of the code with at least 10 pixels per module (each black or white square). Compressed JPEG images can introduce artefacts at module boundaries that confuse decoders; PNG files decode more reliably. If a scan fails, try increasing the image brightness and contrast in any image editor before uploading. For live camera scanning, ensure even lighting with no strong glare on the code surface, and hold the camera steady at a distance where the entire code fills roughly half the frame.

Cameras That Read Codes: How Browser-Based Barcode Scanning Became Possible

For most of the barcode's 70-year history, reading one required specialised hardware — laser scanners in supermarkets, dedicated handheld readers in warehouses, or at minimum a native mobile app with direct camera access. The idea that a webpage could decode a barcode in real time without any installed software would have seemed implausible as recently as 2015. The shift came from two converging developments: the rapid improvement of mobile GPU performance, and browser vendors agreeing to standardise access to device cameras through the `getUserMedia` API, which reached widespread support around 2016.

Early browser-based QR scanners relied entirely on JavaScript libraries that implemented the Reed-Solomon decoding algorithm in software. These worked but were slow, CPU-intensive, and prone to failure on low-contrast or slightly blurry images. The critical improvement came when Google proposed the Shape Detection API — later refined into the BarcodeDetector API — which exposes the same hardware-accelerated image analysis pipelines used by native apps. By delegating to the OS's Vision or ML Kit frameworks, detection speed improved by orders of magnitude and reliability matched native camera apps.

The BarcodeDetector API was shipped in Chrome 83 in 2020 and represents a broader trend of browsers absorbing capabilities that previously required native applications: file system access, Bluetooth, USB, clipboard, and now machine vision. Each standardised capability reduces the gap between web apps and native apps, though browser vendors disagree on how far to extend this access. Firefox's decision not to implement BarcodeDetector reflects an ongoing philosophical debate about whether browsers should expose low-level hardware APIs at all — a debate that the barcode scanning use case makes concrete and practical.

Advertisement