User Rating 0.0
Total Usage 0 times
Allowed: 0-9 - $ : / . +
Is this tool helpful?

Your feedback helps us improve.

About

Codabar is a self-checking linear barcode symbology defined in ANSI/AIM BC3-1995. It encodes characters 0 - 9 plus six special symbols (, $, :, /, ., +) using four bars and three interleaved spaces per character, with each element being either narrow or wide at a ratio of 1:3. Start and stop characters (A, B, C, D) frame the data payload and are mandatory for scanner decode. Misconfigured start/stop pairs or illegal characters cause read failures at the scanner, producing costly re-labeling in library, blood-bank, and logistics workflows where Codabar remains an active standard.

This tool generates specification-compliant Codabar barcodes with configurable module width, bar height, and quiet zones. The encoding uses no check digit by default, matching the original Codabar specification. If your application requires a modulo-16 check digit, calculate it externally and append it to the data field before the stop character. The tool approximates rendering assuming a thermal or laser print resolution; actual scan reliability depends on print DPI and substrate contrast.

codabar barcode generator codabar barcode barcode maker rationalized codabar

Formulas

Each Codabar character maps to a sequence of 7 or 8 elements (alternating bars and spaces). The total barcode width W is computed as:

W = Q + ni=1 Ei + (n 1) G + Q

Where Q = quiet zone width (minimum 10 narrow modules per specification). Ei = sum of element widths for character i, where narrow = 1 module and wide = R modules (R is the wide-to-narrow ratio, typically 2 - 3). G = inter-character gap of 1 narrow module. n = total encoded characters including start and stop.

The encoding is self-checking because no single printing defect can transpose one valid character into another. Each character has exactly 2 or 3 wide elements among its 7 elements, providing a Hamming distance sufficient for error detection without a mandatory check digit.

Reference Data

CharacterPattern (B=Bar, S=Space)Binary (N=Narrow, W=Wide)Element Count
0BSBSBSBNNNNNWW7
1BSBSBSBNNNNWWN7
2BSBSBSBNNNWNNW7
3BSBSBSBWWNNNNN7
4BSBSBSBNNWNNWN7
5BSBSBSBWNNNNWN7
6BSBSBSBNWNNNNW7
7BSBSBSBNWNNWNN7
8BSBSBSBNWNWNNN7
9BSBSBSBWNNWNNN7
BSBSBSBNNNWWNN7
$BSBSBSBNNWWNNN7
:BSBSBSBWNNNWNW7
/BSBSBSBWNWNNNW7
.BSBSBSBWNWNWNN7
+BSBSBSBNNWNWNW7
A (start/stop)BSBSBSBNNWWNWN7
B (start/stop)BSBSBSBNWNWNWN7
C (start/stop)BSBSBSBNNNWNWWN8
D (start/stop)BSBSBSBNNNWWNWN8

Frequently Asked Questions

Codabar uses four start/stop characters: A, B, C, and D. Any combination is valid (e.g., start with A, stop with B). Different industries use specific pairs by convention: libraries typically use A/B, blood banks use C/D. The start and stop characters are transmitted to the decoder and may or may not be stripped depending on scanner configuration.
The original Codabar specification (ANSI/AIM BC3-1995) does not mandate a check digit. However, specific applications require one. The most common is the modulo-16 check: sum all character values, compute S mod 16, and the check digit is 16 R where R is the remainder. Append the resulting character before the stop character. This tool does not auto-calculate a check digit; add it manually to the data field if needed.
The specification requires a minimum quiet zone of 10 narrow module widths on each side of the barcode. In practice, 2.5mm is the absolute minimum for most scanners. This generator uses a configurable padding value that maps to quiet zone width. Insufficient quiet zones are the leading cause of scan failures in production environments.
The wide-to-narrow ratio R must fall between 2.0 and 3.0. A ratio of 2.5 is common for high-density printing. Ratios below 2.0 cause decode ambiguity. Ratios above 3.0 waste label space without improving read reliability. This generator uses a fixed 3:1 ratio for maximum decode margin on standard printers.
Codabar has no specification-defined maximum length. The practical limit is determined by scanner field width (typically 100 - 200mm readable width) and print resolution. At 1mm module width with a 3:1 ratio, each character consumes approximately 10mm. Beyond 15 - 20 data characters, consider switching to Code 128 or a 2D symbology for density.
Codabar encodes only 16 data characters (digits plus 6 symbols), versus Code 39's 43 and Code 128's full ASCII 128. Codabar's advantage is simplicity and self-checking without a mandatory check digit. Code 128 is denser (fewer modules per character) and supports full ASCII. Codabar remains in use primarily in legacy systems: library book tracking (SIN/Codabar), FedEx airbills, and blood bank labeling (ISBT-128 has largely replaced it in newer installations).