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
| Symptom | Most likely cause | Fix |
|---|---|---|
| Code 39 made with a font never scans | Missing asterisk start and stop characters | Type the data as *DATA*, or use a generator that adds them |
| Red or orange bars are ignored | Red scanner light reflects off red ink like it does off white | Print bars in black, dark blue, dark green or dark brown |
| Scans on screen, fails on the label | Bars too thin for the printer, or blurred by low resolution | Widen the narrow bar, print at the printer's native resolution |
| Only scans from far away, or not at all | No quiet zone: text or a border sits against the bars | Leave at least ten narrow bar widths of blank space each side |
| Stretched barcode in Word or a label app fails | Scaling distorted the wide-to-narrow ratio | Insert the image at 100 percent and resize by whole multiples |
| Phone reads it, handheld scanner stays silent | Symbology disabled, or data shorter than the minimum length | Enable the symbology and adjust length limits in the scanner guide |
| Scanner rejects codes with a check digit | Check digit verification setting does not match the codes | Turn verification on or off to match how the codes were made |
| Digits come out as symbols like & or " | Scanner and computer use different keyboard layouts | Set the scanner's keyboard country to match the computer |
| Letters come out in the wrong case | Caps Lock is on, or Code 39 Full ASCII mode is enabled | Turn Caps Lock off; disable Full ASCII unless you need it |
| Beeps, but the till says item not found | The number is not in the product database | Register 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
- Scan the code with a phone app to separate barcode faults from scanner faults.
- Check that the bars are black or another colour that is dark in red light.
- Clear at least ten narrow bar widths of blank space on both sides.
- Print at 100 percent or whole multiples, as PNG, at the printer's native resolution.
- For a Code 39 font, wrap the value in asterisks and remove unsupported characters.
- Confirm the scanner has the symbology, length range and check digit setting you need.
- If the output is garbled, match the keyboard layout and turn off Caps Lock.
- 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.