WebToolsPlanet
Generator Tools

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.

No signup5 formats supportedBrowser-basedNo upload to server

Last updated: July 3, 2026

Client-Side Processing
Input Data Stays on Device
Instant Local Execution
Browser-basedNo accountClient-side decode only

Find this tool useful? Support the project to keep it free!

Buy me a coffee

What 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

1

Drop a barcode image into the upload area, or click to browse for a file

2

Accepted formats: PNG, JPG, WebP, or GIF — a screenshot or phone photo works fine

3

The tool decodes the barcode automatically and shows the detected format and value

4

If the raw image doesn't decode, the tool retries with contrast and sharpness enhancement automatically

5

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:

Uploaded image
File: shipping-label-photo.jpg
Condition: slightly faded thermal print
Decoded result
Detected 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

@zxing/libraryHTML Canvas APIFileReader APIClient-side onlyNo external APIs

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.

Frequently Asked Questions

Which barcode formats does this scanner support?
CODE128, EAN-13, UPC-A, CODE39, and ITF — the five most common 1D barcode formats used in retail, shipping, and inventory. It does not decode 2D formats like QR codes or Data Matrix; use the QR Code Scanner for QR codes.
Can this scan a damaged or faded barcode?
Sometimes. If the original image doesn't decode, the tool automatically retries with contrast enhancement and sharpening. This recovers many faded or low-contrast barcodes, but 1D barcodes have very little built-in error correction — a barcode with a tear or missing bars through the middle of the code usually can't be recovered by image enhancement alone.
Is my uploaded image sent to a server?
No. The image is decoded entirely in your browser using the Canvas API and the zxing decoding library. It is never uploaded, transmitted, or stored anywhere.
Why does the tool say it needed multiple attempts to decode?
That message means the barcode did not decode from the original image on the first try. The tool automatically retried with image enhancement until one pass succeeded. This is common for photos taken at an angle, in low light, or of a faded thermal-printed label.
Is this free to use?
Yes. It is completely free, requires no account, and has no scan limit.