Barcode Scanner
Scan a 1D barcode from a photo, screenshot, or saved image. Upload the file and the decoded value — a product code, tracking number, or ID — appears instantly, along with the detected format. Everything runs in your browser; the image is never uploaded to a server.
Last updated: July 3, 2026
Related shortcuts
Find this tool useful? Support the project to keep it free!
Buy me a coffeeWhat is Barcode Scanner?
A barcode scanner reads the pattern of bars and spaces in a 1D barcode and converts it back into the original encoded value — a product number, a shipping tracking number, or an internal inventory ID. This tool decodes five common 1D formats: CODE128 (shipping and general logistics), EAN-13 (international retail products), UPC-A (US retail products), CODE39 (industrial and healthcare), and ITF (shipping cartons).
Decoding uses the zxing barcode library, running entirely in your browser via the Canvas API. Unlike a QR code, a 1D barcode has almost no built-in error correction, so damage or poor print quality is much more likely to cause a decode failure outright. If the raw image doesn't decode, the tool automatically retries with a short sequence of enhancements — contrast stretching, 2x upscaling, and sharpening — which recovers a meaningful number of barcodes that are blurry, faded, or low-contrast, though it can't recover a barcode that's genuinely torn or missing data.
How to Use Barcode Scanner
Drop a barcode image into the upload area, or click to browse for a file
Accepted formats: PNG, JPG, WebP, or GIF — a screenshot or phone photo works fine
The tool decodes the barcode automatically and shows the detected format and value
If the raw image doesn't decode, the tool retries with contrast and sharpness enhancement automatically
Copy the decoded value with one click
Common Use Cases
- Look up a product barcode from a photo without a dedicated retail scanner
- Verify a barcode you generated actually encodes the correct number before printing labels in bulk
- Decode a barcode from a screenshot or shipping document when a physical scanner isn't available
- Check a damaged, faded, or torn barcode to see if it still contains readable data
- Read an inventory or asset tag barcode from a photo taken on a warehouse floor
Example Input and Output
Scanning a CODE128 shipping label barcode from a phone photo:
File: shipping-label-photo.jpg
Condition: slightly faded thermal printDetected format: CODE128
Decoded value: 1Z999AA10123456784
Decoded using: Contrast-enhanced pass (2 attempts)How This Tool Works
The uploaded image is drawn onto an off-screen Canvas element and read as pixel data. That pixel data is converted to a luminance source and passed to the zxing MultiFormatReader, configured with hints restricting detection to CODE128, EAN-13, UPC-A, CODE39, and ITF with the TRY_HARDER decoding mode enabled. If the first attempt fails, the tool reprocesses the same pixel data — grayscale contrast stretching, 2x canvas upscaling, and a 3x3 unsharp-mask sharpen — and retries decoding after each step, stopping as soon as one attempt succeeds.
Technical Stack
Privacy First
Your image is processed entirely in your browser using the Canvas API and the zxing decoding library. It is never uploaded to, transmitted to, or stored on our servers.
Why 1D barcodes are less damage-tolerant than QR codes
QR codes include built-in error correction that can recover up to 30% data loss. Most 1D barcode formats have little to no equivalent redundancy, so physical damage — tears, creases, or heavy fading — is much more likely to break a 1D barcode outright than the same damage would to a QR code.

