Tools Nimbus

Why is my barcode not scanning

Tools Nimbus is a free, no-signup developer toolkit that runs entirely in your browser, so your data is never uploaded to a server. A barcode that will not scan is usually failing on contrast, bar size, a missing quiet zone, or a symbology the scanner is not set up to read. Test it with a phone app first. If a Code 39 code is at fault, regenerate it with the Tools Nimbus Barcode Generator.

Last updated September 2026

First, find out whether the barcode or the scanner is at fault

Every scanning failure falls into one of three groups, and one quick test tells them apart. Open any free barcode scanning app on a phone and point it at the code.

  • The phone cannot read it either. The printed symbol is the problem: contrast, size, print quality, the margins, or the data itself. Work through the table below.
  • The phone reads it but your scanner does not. The barcode is valid and the scanner is not configured for it, or the bars are a colour that a red scanning beam cannot see.
  • The scanner beeps but the result is wrong. Decoding worked. The fault is in how the scanner types the result, or in the system that looks the number up afterwards.

Symptoms, causes and fixes

SymptomMost likely causeFix
Code 39 made with a font never scansMissing asterisk start and stop charactersType the data as *DATA*, or use a generator that adds them
Red or orange bars are ignoredRed scanner light reflects off red ink like it does off whitePrint bars in black, dark blue, dark green or dark brown
Scans on screen, fails on the labelBars too thin for the printer, or blurred by low resolutionWiden the narrow bar, print at the printer's native resolution
Only scans from far away, or not at allNo quiet zone: text or a border sits against the barsLeave at least ten narrow bar widths of blank space each side
Stretched barcode in Word or a label app failsScaling distorted the wide-to-narrow ratioInsert the image at 100 percent and resize by whole multiples
Phone reads it, handheld scanner stays silentSymbology disabled, or data shorter than the minimum lengthEnable the symbology and adjust length limits in the scanner guide
Scanner rejects codes with a check digitCheck digit verification setting does not match the codesTurn verification on or off to match how the codes were made
Digits come out as symbols like & or "Scanner and computer use different keyboard layoutsSet the scanner's keyboard country to match the computer
Letters come out in the wrong caseCaps Lock is on, or Code 39 Full ASCII mode is enabledTurn Caps Lock off; disable Full ASCII unless you need it
Beeps, but the till says item not foundThe number is not in the product databaseRegister the GTIN and add the product, not a new barcode

Contrast: why red bars are invisible

Most laser scanners and linear imagers light the code with red light at roughly 630 to 680 nanometres and measure how much bounces back. Dark bars absorb that light and the spaces reflect it. The catch is that red, orange, yellow and pink ink also reflect red light, so to the scanner a red bar on white paper looks like white on white. Your eyes see high contrast and the scanner sees none.

The safe rule is dark bars on a light background, and dark means dark in red light: black, navy, dark green or dark brown. A red or yellow background behind black bars is fine for the same reason. Inverted barcodes (light bars on a dark background) and bars printed on foil, glossy laminate or a clear sticker over a dark product also fail often, because the reflection is unpredictable. Phone cameras see the full spectrum, which is why a red barcode can scan on a phone and fail at a till.

Size, print resolution and the quiet zone

Scannability depends on the width of the narrowest bar, the X-dimension. For Code 39 a narrow bar of about 0.25 mm is a sensible floor for everyday handheld scanners. Code 39 spends roughly 13 to 16 narrow bar widths on every character, so a long value produces a wide symbol. Squeeze a 20-character serial number onto a small label and the narrow bars shrink below what the scanner can resolve. Shorten the data or use a bigger label.

Print resolution matters as much as size. A 203 dpi thermal label printer lays down dots about 0.125 mm wide, so a narrow bar has to be a whole number of dots. When a barcode image is scaled by a fraction, some bars round up and others round down, the wide-to-narrow ratio drifts, and a code that looked perfect on screen fails on paper. Insert barcode images at their native size or scale by whole multiples. Save them as PNG rather than JPEG, because JPEG compression smears the edges of the bars (see JPG vs PNG for why).

The quiet zone is the blank margin on either side of the bars, and a scanner uses it to find where the symbol starts. Code 39 needs at least ten narrow bar widths of empty space on each side. A label border, a product name or the edge of a cropped image sitting too close is enough to make an otherwise perfect barcode unreadable.

Code 39 problems that only look like scanner faults

  • No asterisks. Code 39 starts and ends with an asterisk character. Barcode fonts do not add them, so a font-based barcode typed as ABC123 instead of *ABC123* has no start or stop pattern and will never scan. The asterisk is never part of the data and the scanner does not output it.
  • Characters outside the set. Standard Code 39 encodes only A to Z, 0 to 9, space and the symbols - . $ / + %. A font will still draw something for a lowercase letter, a comma or an underscore, but scanners will not accept it.
  • Check digit mismatch. Code 39 has an optional mod 43 check character. If the scanner is set to verify it and your codes were made without one, every scan fails, and in the opposite case the scanner outputs an extra trailing character. Match the two settings.
  • Full ASCII mode. Some scanners can decode an extended form of Code 39 in which pairs like +A mean a lowercase a. If that mode is on while reading ordinary codes, values containing + / % or $ come out altered.

The Barcode Generator avoids the first three: it adds the start and stop characters for you, uppercases lowercase input, rejects characters Code 39 cannot hold, makes the mod 43 check character optional, and draws a ten narrow bar quiet zone into the PNG. It makes Code 39 only. If you need a retail UPC or EAN code, the number has to come from GS1, and no generator can make that number valid at a checkout on its own.

When the scanner reads it but the result is wrong

Most USB and Bluetooth scanners act as a keyboard, typing the decoded value into whatever field has focus. That is convenient and fragile. If the scanner is set to a US layout and the computer uses a French AZERTY layout, the digits arrive as & and punctuation. Many scanners also send letters by simulating the Shift key, so Caps Lock on the computer can flip the case. And if the form needs an Enter key after the value, the scanner has to be configured to send one as a suffix. Every one of these is fixed by scanning a setup code from the manufacturer's programming guide, not by changing the barcode.

A checklist

  1. Scan the code with a phone app to separate barcode faults from scanner faults.
  2. Check that the bars are black or another colour that is dark in red light.
  3. Clear at least ten narrow bar widths of blank space on both sides.
  4. Print at 100 percent or whole multiples, as PNG, at the printer's native resolution.
  5. For a Code 39 font, wrap the value in asterisks and remove unsupported characters.
  6. Confirm the scanner has the symbology, length range and check digit setting you need.
  7. If the output is garbled, match the keyboard layout and turn off Caps Lock.
  8. If it beeps but the product is unknown, fix the database entry, not the barcode.

Two-dimensional codes fail for related but different reasons, covered in why is my QR code not scanning. If what you need to encode is a URL rather than a short identifier, use the QR Code Generator instead, since Code 39 cannot hold lowercase letters or most URL punctuation. All of our Tools Nimbus guides are indexed on one page.

Frequently asked questions

Why does my barcode scan on my phone but not with a handheld scanner?+

The phone app decodes every symbology it knows, while a handheld scanner only decodes the ones enabled in its configuration, and often only within a set length range. A phone camera is also far more forgiving of colour, since it sees the full visible spectrum instead of a narrow red beam. If the phone reads the code, the printed barcode is fine: check the scanner's enabled symbologies, check digit setting and minimum length in its programming guide, or test whether the bars are a colour that a red laser cannot see.

Why is my Code 39 barcode font not scanning?+

Almost always because the text was typed without the asterisks. Code 39 needs an asterisk start character before the data and an asterisk stop character after it, so ABC123 has to be typed as *ABC123* before the font is applied. Without them the bars are valid Code 39 characters but no scanner recognises where the symbol begins. Lowercase letters and unsupported punctuation also break font-based barcodes, because the font draws a pattern for them that is not part of the standard 43-character set.

Why does my barcode scan but show the wrong characters?+

The scanner decoded the barcode correctly and the problem is in how it types the result. Most USB scanners pretend to be a keyboard, so a mismatch between the scanner's keyboard layout and the computer's layout turns digits into symbols (a French AZERTY layout is the classic case), and Caps Lock can invert the letter case. Other culprits are Code 39 Full ASCII mode being switched on, which turns pairs like +A into a lowercase a, or a prefix or suffix configured on the scanner.

Can a barcode be printed in colour?+

Yes, as long as the bars are dark in red light. Most laser and linear imager scanners illuminate the code with red light at roughly 630 to 680 nanometres, so red, orange, yellow and pink bars reflect it and look the same as the white background. Black, dark blue, dark green and dark brown bars work. The reverse also holds: a red or yellow background is acceptable behind black bars. Light bars on a dark background are unreliable on most scanners.

How big does a barcode need to be to scan?+

It depends on the narrowest bar, called the X-dimension, rather than on the overall size. For Code 39 a narrow bar of about 0.25 mm (roughly 10 mil) or wider is a safe target for ordinary handheld scanners, with a blank quiet zone of at least ten narrow bars on each side. Longer data makes the whole symbol wider at the same X-dimension, so if a long code has to fit a small label, the bars get thinner and scanning gets harder.

My barcode scans but the till says item not found. Is the barcode broken?+

No. A beep means the scanner decoded the number correctly, and the failure happens afterwards, when the point-of-sale system looks that number up in its product database and finds nothing. Retail UPC and EAN barcodes must carry a GTIN issued through GS1, and a retailer's system will only recognise numbers that have been registered and added to its catalogue. Generating a different barcode image does not fix this; getting the product listed does.

Try these browser-based tools mentioned in this guide. Everything runs locally, so your data never leaves your device.