How to Decode a Barcode Online — From a Photo, Camera, or Screenshot
Decode a barcode online in seconds: upload a photo, point your camera, or paste a screenshot. A step-by-step guide to reading EAN, UPC, Code 128, QR, and PDF417 — with fixes when a code will not read.

If you need to decode a barcode — turn the bars under a product, a ticket, or a shipping label into the numbers or text they contain — you do not need to install anything. A browser-based barcode reader online can read the code directly from a photo, your camera, or a screenshot, entirely on your device. This guide walks through each method and shows you what to try when a code refuses to read.
Decode vs. generate: which tool do you need?
People often arrive looking for a "barcode scanner" when they actually mean one of two different things:
- Decode (read) an existing code → you want the value hidden in the bars. Use the online barcode decoder described here.
- Generate (create) a new code → you have a number and want a barcodes image. That is the barcode generator.
Everything below is about the first case: reading a code that already exists.
Method 1: decode a barcode from a photo
This is the most reliable method when you already have an image.
- Open the barcode scanner and choose Upload Image.
- Select the photo from your device — a product shot, a screenshot from a PDF, or a picture of a label all work.
- The barcode reader online decodes the image locally and shows the value plus the detected format (for example EAN-13, UPC-A, Code 128, QR, or PDF417).
Example: photograph the EAN-13 under a book. The reader returns the 13-digit ISBN, usually starting with 978 or 979.
Method 2: decode with your camera (live)
For codes you have in front of you and do not want to photograph first:
- Open the scanner and choose Start Camera (allow camera access when your browser asks).
- Point the camera at the barcode. On phones the rear camera is used by default.
- Hold steady for a moment — the reader samples video frames continuously and decodes as soon as one frame is clean enough.
Live mode keeps a short history of the last results, so you can scan several codes in a row without resetting.
Method 3: read a barcode from a screenshot or pasted image
Screenshots are a special case because they are often low-resolution. If you need to read a barcode from a document screenshot:
- Crop the screenshot to the barcode plus a little white space around it — the quiet zone matters.
- Save or drag the cropped image into the upload area.
- If it still will not read, take a fresh photo instead: screenshots of screens frequently carry moiré patterns that confuse decoders.
For barcodes shown on a monitor, the read small barcodes from documents approach — higher-resolution capture with more light — beats zooming into a low-res screenshot.
Which formats can the decoder read?
The barcode decoder supports both 1D and 2D symbologies:
- 1D: EAN-13, EAN-8, UPC-A, UPC-E, Code 128 (including GS1-128), Code 39, ITF (Interleaved 2 of 5), Codabar, Code 93.
- 2D: QR Code, Data Matrix, PDF417, Aztec, GS1 DataBar.
If your code is one of these but still fails, the problem is almost always image quality — see the next section.
Why a barcode will not read, and how to fix it
| Symptom | Likely cause | Fix |
|---|---|---|
| No value returned | Barcode is blurred or out of focus | Retake with more light and steady hands |
| Wrong or partial digits | Code is cropped or the quiet zone is missing | Include white margin on all sides |
| Decoder says "not detected" | Extreme glare or low contrast | Change the angle, avoid direct flash |
| Scan works in a store but not here | Uncommon symbology variant | Check the format against the supported list above |
| GS1-128 returns one long string | Application Identifiers not split | The reader reports it as Code 128; parse AI fields separately |
A GS1-128 label is decoded as Code 128, so the value comes back as one plain string without parentheses around the Application Identifiers. That is expected — the decoder reads the bars faithfully; splitting (10)ABC(21)XYZ into fields is a separate parsing step.
Is decoding private?
Yes. Decoding happens entirely in your browser using the ZXing library. No image is uploaded to a server and no result is stored. This matters for codes on private documents, medical labels, or tickets — see the privacy note on the scanner page.
Go decode a barcode now
Open the free online barcode scanner, upload a photo or start your camera, and read your code in seconds. No signup, no upload, no installation.
If you need the opposite — to create a code from a number — use the barcode generator. For the deeper reasons a code fails in hardware scanners, read the scanner configuration guide.
