Barcode Scanner - Scan 1D/2D Barcodes with Camera
Camera, Mic & Media
Scan EAN-13, UPC-A, Code 128, Code 39, and other barcodes with your camera or from an uploaded image. All processing happens locally in your browser.
How to use this tool
- Click "Start Camera" to begin scanning, or "Upload Image" to decode a saved image.
- Point the camera at a barcode or upload an image containing one.
- The barcode value and format appear below the preview after it is decoded.
How scanning works
The scanner looks for a barcode in the live camera frame or in an image you choose. It uses
the browser's native BarcodeDetector when that API supports the requested format. If
the API is missing or supports only some formats, a locally bundled ZXing decoder handles the remaining
scans. Software decoding can take longer, especially on a large image or an older phone.
Supported barcode formats
| Format | Type | Common use |
|---|---|---|
| EAN-13 | 1D | Retail product packaging worldwide (13 digits) |
| EAN-8 | 1D | Small product packaging (8-digit abbreviated EAN) |
| UPC-A | 1D | Retail products in North America (12 digits) |
| UPC-E | 1D | Compact UPC labels on small retail products |
| Code 93 | 1D | Inventory and logistics labels |
| ITF | 1D | Carton and shipping case labels |
| Code 128 | 1D | Shipping labels, inventory, logistics (full ASCII) |
| Code 39 | 1D | Industrial and government ID systems |
| QR Code | 2D | URLs, contact info, payments; up to 4,296 characters |
| Data Matrix | 2D | Electronics, pharmaceuticals, small parts marking |
| PDF417 | 2D | Driver's licenses, boarding passes, ID documents |
| Aztec | 2D | Train/airline boarding passes |
A one-dimensional retail barcode usually stores an identifier, not a product description. For example, an EAN-13 scan can give a checkout system the number it needs to search its own catalog. QR codes, Data Matrix, PDF417, and Aztec can carry longer text or structured data such as a website address, boarding-pass details, or Wi-Fi settings. The meaning comes from the value encoded in the symbol; this scanner does not look up products or verify the source.
Tips for better scanning
- Hold the camera steady with good lighting.
- Keep the barcode flat and free from glare or reflections.
- If scanning fails, try uploading a cropped image of the barcode.
Your camera feed never leaves your device
Detection uses the browser's native API or the locally bundled ZXing software decoder. Camera frames, uploaded images, and decoded values stay in this browser tab and are not transmitted to a server. The scanner does not save scan history or store barcode contents in localStorage.
Browser compatibility note
Browser support for BarcodeDetector and its individual formats varies. When a browser
does not provide a format, the tool loads ZXing on demand and tries that decoder locally. This fallback
supports common 1D and 2D formats, but it may be slower and can still miss a code if the image is
blurry, reflective, small, or angled. Crop the image, improve the lighting, or hold the camera steady
and try again.
What information is in a barcode?
- 1D barcodes (EAN, UPC, Code 128, Code 39): Encode only a number or short text string. The barcode itself contains no product description — that information must be looked up in a database (e.g., a product catalog or inventory system) using the decoded number as a key.
- QR codes: Can encode up to 4,296 alphanumeric characters. Common payloads include URLs, vCard contact info, Wi-Fi credentials (SSID + password), Bitcoin payment addresses, and plain text.
- PDF417: Often found on driver's licenses and boarding passes. Encodes structured data including name, address, date of birth, and document number.
- Data Matrix: Common on electronics PCBs and pharmaceutical blister packs. Encodes serial numbers, part numbers, and traceability codes in a very small footprint.
Frequently asked questions
Which barcode formats are supported?
EAN-13, EAN-8, UPC-A, UPC-E, Code 128, Code 39, Code 93, ITF, PDF417, Data Matrix, Aztec, and QR Code. The tool uses BarcodeDetector where available and a local ZXing fallback for unsupported formats.
Does this upload my camera feed?
No. All barcode detection runs locally in your browser. Nothing is sent to a server.
Related tools
- Barcode GeneratorGenerate a barcode and return here to verify that it decodes correctly.
- QR Code ScannerScan QR content when the symbol is a two-dimensional square code.
- Webcam TestCheck camera focus and resolution when barcode recognition is unreliable.
- ISBN ValidatorValidate a scanned ISBN and inspect its check digit.