How to scan a barcode online
- Press Scan with camera and allow the camera when your browser asks. On a phone, the back camera is used.
- Hold the barcode or QR code inside the frame, 10 to 20 cm away. The scanner stops as soon as it reads a code.
- Copy the result, or press Scan another. No camera? Choose a photo or screenshot instead.
What the result tells you
Each code shows its type and its content. For product barcodes (EAN and UPC), the scanner also checks the last digit, which is calculated from the others so tills can catch misreads, and names the GS1 office that issued the number. Book barcodes starting 978 or 979 are ISBNs, so you also get the older 10-digit ISBN; magazine barcodes starting 977 give the ISSN. QR codes with a web link show the site's address before you open it, UPI payment codes show the payee and amount, and Wi-Fi codes show the network name.
Example: checking an EAN-13 barcode
The barcode 4006381333931 has 12 digits plus a check digit. Multiply the first 12 alternately by 1 and 3: 4ร1 + 0ร3 + 0ร1 + 6ร3 + 3ร1 + 8ร3 + 1ร1 + 3ร3 + 3ร1 + 3ร3 + 9ร1 + 3ร3 = 89. The check digit is what brings that to the next multiple of 10: 90 โ 89 = 1, which matches the last digit, so the scanner shows 1 (correct). The first three digits give GS1 prefix 400: GS1 Germany.
Barcodes it reads
Barcodes made of lines (1D) and square codes made of dots (2D):
| Code | Where you see it |
|---|---|
| EAN-13 | Product number on retail goods (GTIN-13) |
| UPC-A | Product number on retail goods in the US and Canada (GTIN-12) |
| EAN-8 | Short product number for small packs (GTIN-8) |
| UPC-E | Short UPC for small packs (a compressed UPC-A) |
| Code 128 | Shipping labels, stock and serial numbers (letters and digits) |
| Code 39 | Industry, ID badges and older systems (capital letters and digits) |
| Code 93 | Logistics labels (a denser Code 39) |
| ITF | Cartons and outer cases (ITF-14 holds a GTIN-14) |
| Codabar | Libraries, blood banks and parcel services |
| QR code (2D) | Links, text, payments and Wi-Fi logins |
| Data Matrix (2D) | Small parts, medicines and electronics |
| PDF417 (2D) | Boarding passes, ID cards and driving licences |
| Aztec (2D) | Tickets and boarding passes |
If a code won't scan
- Move closer until the code fills most of the frame, then hold still for a second so the camera can focus.
- Avoid glare: tilt shiny packaging slightly, or turn on the torch where your phone offers it.
- For a photo, crop it close to the code and make sure the whole code, including its edges, is in the picture.
- A barcode on a screen reads best with the screen brightness turned up.
How it works
Where the browser has a built-in barcode reader (the Barcode Detection API, found in Chrome on Android and Mac, for example), the scanner uses it. Elsewhere it loads ZXing-C++, an open-source barcode library (Apache-2.0 licence), once, about 1 MB. Either way the camera picture and your photos are read on your device and never uploaded. To make barcodes, use the Barcode generator; to read a QR code from an image and check a UPI payment before you pay, there is also the QR code scanner.
ZXing-C++ runs as WebAssembly built by zxing-wasm (MIT licence). Licence notice.