1. Home
  2. Productivity tools
  3. Barcode Scanner (Read Barcodes from Camera or Image)

Barcode Scanner (Read Barcodes from Camera or Image)

For sellers, stockroom staff and shoppers who have a barcode in a photo, a screenshot or in front of a camera and want to know the number.

Free, no sign-up. Runs in your browser: nothing is uploaded.

How to use Barcode Scanner (Read Barcodes from Camera or Image)

  1. Press Scan with camera, or drop or paste a photo of the barcode, or press Sample.
  2. Hold the barcode flat and straight in the frame, or use a sharp photo with a little white space either side.
  3. Read the result and copy the value.

Features

  • Reads EAN-13, UPC-A, EAN-8, Code 128 and Code 39 with a reader built into the page
  • Checks the check digit or check symbol, so a misread is rejected
  • Works on photos, screenshots and the live camera, upside down, mirrored or on its side
  • Also reads QR codes, and any type your browser’s own detector supports
  • Nothing is uploaded or saved

Supported formats

Input

  • Photo or screenshot
  • Camera

You get

  • On-screen results

Private by design

Everything you enter is processed by your browser on this device. Nothing is sent to openWorkstand or anyone else, so the Barcode Scanner (Read Barcodes from Camera or Image) is safe for private and work data. After you have used it once while online, it also works without an internet connection. How local processing works

Good to know

  • It reads EAN-13, UPC-A, EAN-8, Code 128 and Code 39 itself; other types need a browser that supports them.
  • Blurry, tilted, curved or glare-covered barcodes may not read: retake a sharper photo.

Guide

Reading a barcode from a photo or a camera, and why the check digit decides what is shown

A barcode is a number written in stripes, and reading one is a matter of measuring them. A shop scanner does it with a laser; a phone camera does it with software. This page does it in your browser with a reader of its own, so it works on a laptop with a webcam, on a screenshot of a product listing, or on a photo you took of a label, without installing anything and without sending the picture anywhere.

What it reads

The built-in reader handles EAN-13 and EAN-8, the numbers on retail products worldwide, UPC-A, the twelve-digit American version, Code 128, the common choice for stock codes and shipping labels, and Code 39, an older code for capital letters and digits. The page also reads QR codes, and if your browser has its own barcode detector, it adds whatever that finds, such as ITF or Code 93. The result table says which reader found each code.

How a picture becomes a number

A barcode is read along a line. The page takes 48 horizontal lines across the picture and 48 vertical lines down it, so the code can sit anywhere and be upright, upside down or on its side. Each line is reduced to alternating runs of dark and light, using a threshold that follows the local brightness, so a shadow across the photo does not ruin it. The runs are then compared with the patterns of each barcode type, in both directions.

Why misreads are rejected

An EAN or UPC number ends with a check digit worked out from the others by weighting alternate digits one and three. If the reader gets a single digit wrong, the check fails and the code is thrown away rather than shown. Code 128 has a check symbol that does the same job with a sum modulo 103. Code 39 has no check digit, so the page asks two separate lines to agree before it believes a Code 39 read.

A worked example

Press Sample. The page draws an EAN-13 for 5901234123457 on a canvas, scans it as if it were a photo, and shows it in the table with the type EAN-13. The check digit works out as follows: the first twelve digits, 5 9 0 1 2 3 4 1 2 3 4 5, weighted 1, 3, 1, 3 and so on, add up to 83, and 10 minus the last digit of 83 gives 7, which is the thirteenth digit. The bars are 95 modules wide: a three-module start guard, six left digits of seven modules, a five-module centre guard, six right digits and a three-module end guard.

Taking a readable photo

Fill most of the frame with the barcode and keep the bars running straight across. Leave a little white space at each end, since the reader relies on it to find where the code starts. Use even light and avoid reflections on glossy packaging. Hold the camera steady until the text under the bars is sharp. Very small bars, with each only a pixel or so wide in the picture, are the commonest reason for a read to fail, so move closer rather than zooming in on a small image.

Camera, files and privacy

The camera button opens your device’s camera, preferring the rear one on a phone, and checks frames several times a second until it finds a code. You can instead drop or paste a picture; HEIC photos from some phones are converted first. Pictures and frames are processed in memory on your device. Nothing is uploaded, and the codes you scan are not saved when you leave the page.

Edge cases

A picture with several barcodes lists each of them. If the same value is found by more than one reader it appears once. A photo that is too dark or too bright may find nothing even when a code is present, in which case the message suggests a sharper, well-lit picture. Screenshots of a barcode on a screen usually read well, but moiré from photographing a monitor can spoil the bars.

Limits

The page’s own reader does not handle every type: ITF, Codabar, Code 93, UPC-E and two-dimensional codes other than QR depend on your browser’s detector, which some desktop browsers do not have. It cannot repair a damaged barcode, and it does not look up what a number belongs to, so it tells you the number and not the product.

Checked against the current version of the Barcode Scanner (Read Barcodes from Camera or Image) on .

Frequently asked questions

Why is the first digit of an EAN-13 never drawn?

Because it is hidden in the pattern of the left half. Each of the six left digits is drawn in one of two styles, and the order of styles spells the first digit: for example the sample 5901234123457 uses the style sequence L G G L L G for the leading 5. The reader decodes the styles and recovers the digit.

What is the difference between UPC-A and EAN-13 on the result?

A UPC-A code is an EAN-13 with a leading 0, so it has twelve digits and is drawn identically. When the recovered first digit is 0, the page reports a UPC-A and shows the twelve digits that are printed under the bars.

Why does a perfectly good barcode sometimes not read?

Reflections, blur, a tilted or curved label and very small bars are the usual causes. Retake the photo closer, in even light, with the barcode filling most of the frame and the lines running straight across.

How can the page be sure a number is right?

EAN, UPC and Code 128 all end with a check digit or check symbol that is calculated from the rest. A code is shown only when that check works out, so a misread almost always fails the check and is thrown away.

Keep working with the result

openWorkstand also includes a free workspace with documents, spreadsheets, tasks, projects and a calendar that save to a folder on your computer.