To scan a barcode with your webcam, open Zro7 QR & Barcode Scanner, allow camera access, and point the code at the viewport. ZXing decodes it in real time and prints the payload — for QR, WiFi, vCard, EAN, UPC, Code 128, Code 39, Data Matrix, and more.
How it works under the hood
navigator.mediaDevices.getUserMedia({ video: true })opens the camera.- The video stream is drawn to a hidden
<canvas>at ~30 FPS. @zxing/browserruns pattern detection on each frame in a Web Worker.- First successful decode → payload is displayed; camera stays live so you can scan more.
Front vs rear camera
On mobile, Zro7 requests the rear camera (facingMode: 'environment') because it's the only one that focuses close enough to read a barcode. On laptops there's only the front cam — hold the code steady 15–20 cm away.
Formats supported
- QR (all versions), Data Matrix, Aztec, PDF417.
- EAN-8, EAN-13, UPC-A, UPC-E.
- Code 39, Code 128, Codabar, ITF-14.
Why local scanning matters
A QR can encode a WiFi password, a Bitcoin address, or a login OTP. Any 'online QR scanner' that uploads your image sees that data. In-browser scanning keeps it in the tab.
Steps
- Open QR & Barcode Scanner.
- Grant camera permission.
- Point at the barcode; decoded payload appears within a second.
- Copy the result or scan another.
Zro7