Skip to content
Toolcroft

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

  1. Click "Start Camera" to begin scanning, or "Upload Image" to decode a saved image.
  2. Point the camera at a barcode or upload an image containing one.
  3. 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

FormatTypeCommon use
EAN-131DRetail product packaging worldwide (13 digits)
EAN-81DSmall product packaging (8-digit abbreviated EAN)
UPC-A1DRetail products in North America (12 digits)
UPC-E1DCompact UPC labels on small retail products
Code 931DInventory and logistics labels
ITF1DCarton and shipping case labels
Code 1281DShipping labels, inventory, logistics (full ASCII)
Code 391DIndustrial and government ID systems
QR Code2DURLs, contact info, payments; up to 4,296 characters
Data Matrix2DElectronics, pharmaceuticals, small parts marking
PDF4172DDriver's licenses, boarding passes, ID documents
Aztec2DTrain/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.

Browse all camera, mic & media