Codabar Barcode Symbology and Reader SDK

Codabar, also called NW-7, is a numeric 1D barcode that starts and ends with one of four letters: A, B, C or D. barKoder reads Codabar labels on library books, blood bags and airbills with the phone and tablet cameras in your iOS, Android and web apps.

Codabar

Codabar at a glance

Codabar key facts
TypeDiscrete, self-checking linear (1D) symbology. Each character has 7 elements, 4 bars and 3 spaces, each narrow or wide.
Character setDigits 0-9 and the symbols - $ : / . +. The letters A, B, C and D are used only as start and stop characters (some specifications label them T, N, * and E). barKoder includes them in the result, for example A40156B.
CapacityVariable length. Each application sets its own data length.
Check digitNone required, because every character is self-checking. Some applications add an optional check digit, often modulo 16.
StandardAIM Uniform Symbology Specification Codabar (ANSI/AIM BC3). Known as NW-7 in Japan (JIS X 0503).
Typical usesLibrary books and cards, blood bank labels (ABC Codabar), photo labs, FedEx airbills

What Codabar is and how it is built

Codabar is one of the oldest barcode symbologies. It was developed in 1972 at Pitney Bowes, and its other names include NW-7, USD-4, Monarch and Code 2 of 7. It was designed for retail price labels, then found its long-term home in libraries, blood banks, photo labs and courier airbills.

A Codabar symbol has five parts:

  • Quiet zone: a blank margin before and after the bars.
  • Start character: A, B, C or D.
  • Data: digits and the symbols - $ : / . +, each character separated by a narrow gap.
  • Stop character: A, B, C or D. It does not have to match the start character.
  • Quiet zone: a second blank margin.

The start and stop letters frame the data, and the 16 possible start/stop pairs can tell one application's labels from another's. Because each character is self-checking, Codabar needs no check digit, though some systems add one.

Sample Codabar barcode encoding A26021982D
This sample encodes A26021982D: start character A, the digits 26021982 and stop character D.

Codabar start and stop characters and variants

Every Codabar reader decodes the same characters. What differs between labels is the choice of start and stop letters, the bar widths and the data format.

Codabar variants and names
VariantWhat it isScanning notes
Start/stop A-DAny of the four letters can start or end the symbol. Some specifications call them T, N, * and E.Use the letters to check that a label belongs to your application
Traditional CodabarThe original Pitney Bowes design, with wide-to-narrow ratios varied so every character has the same widthSame decoder
Rationalized CodabarUses one fixed wide-to-narrow ratio, so character widths varySame decoder
NW-7The Japanese name for Codabar, standardized as JIS X 0503Same symbology, same characters
ABC CodabarThe blood bag label adopted in 1977. Replaced by ISBT 128 in many countries.Hospitals may still meet both label types
FedEx airbillA 12-digit tracking number plus a format ID, starting with C and ending with DThe airbill check digit algorithm is not public

Where Codabar barcodes are used

Codabar survives where large numbers of labels were printed long ago and are still in circulation.

Blood banks and labs

ABC Codabar, ISBT 128

US blood banks introduced the ABC Codabar blood bag label in 1977. ISBT 128 later replaced it, and AABB required ISBT 128 by May 2008, but hospitals handled both label types for years during the switch. Apps that read older bags and lab forms still need Codabar.

Barcode scanning for healthcare →

Libraries

Books, library cards

Libraries adopted Codabar soon after 1972 to speed up check-outs and returns, and it still has a large installed base on books and library cards. Scan a whole shelf of book labels at once with Batch MultiScan.

Barcode scanning for education →

Courier and logistics

Airbills, shipping forms

Codabar was built to print reliably on dot matrix printers, which made it a fit for multi-part forms such as FedEx airbills. The FedEx variant starts with C and ends with D.

Barcode scanning for logistics →

Scanning Codabar with barKoder

The barKoder Barcode Scanner SDK reads Codabar on iOS, Android, the web, Windows and Linux, and in Flutter, React Native, .NET MAUI, Capacitor, Cordova and NativeScript apps. These features matter most for this code.

Segment Decoding for curved labels

Reads all supported 1D barcodes with strong deformation, such as labels wrapped around test tubes and bottles or wrinkled forms, where no straight line crosses all the bars.

Segment Decoding →

Batch MultiScan for shelves

Decodes several barcodes in one camera view, whatever their type or size. The feature page names library bookshelves as a use case: capture the labels on many books in one pass.

Batch MultiScan →

Length range per symbology

Codabar has no fixed length, so set the minimum and maximum length your labels use. The Web SDK method is setLengthRange, which sets the minimum and maximum length to be detected.

Web SDK API reference →

Codabar scanner API

Enable only the decoders you need. This Web SDK call enables Codabar, using the decoder constant from the barKoder docs.

Web SDK (JavaScript)

JavaScript
Barkoder.setEnabledDecoders(Barkoder.constants.Decoders.Codabar);

On Android the same decoder is Barkoder.DecoderType.Codabar.

Get scanning in three steps

  1. Get a free trial license and install the SDK for your platform.
  2. Enable the Codabar decoder and set the length range your labels use.
  3. Read the result in your callback and check the start and stop letters if your application uses them.
See the Web SDK API reference

Decoder lists for other platforms: Android general example and Android API reference.

Scan a Codabar barcode on your phone or in your browser

Install the free barKoder demo app, or open the web demo, and scan your own Codabar labels before you integrate the SDK. To read a single code from a photo or screenshot, use the free online barcode scanner.

iPhone and iPad

barKoder demo app for iOS

Scan with your camera, or point it at the QR code to open the App Store.

Download on the App Store
QR code linking to the barKoder demo app on the App Store

Android phones and tablets

barKoder demo app for Android

Scan with your camera, or point it at the QR code to open Google Play.

Get it on Google Play
QR code linking to the barKoder demo app on Google Play

Any modern browser

barKoder web demo

Runs the Web SDK in your browser, on desktop or mobile, with nothing to install.

Open the web demo
QR code linking to the barKoder web demo

Test with known samples. Print or display the testing sheet and scan each 1D and 2D barcode with the demo app. The data sheet summarizes the SDK for your team.

Codabar barcode questions

What is Codabar?

Codabar is a linear (1D) barcode symbology developed in 1972 at Pitney Bowes. It encodes the digits 0-9 and six symbols (- $ : / . +) between a start and a stop letter, A, B, C or D. It is also called NW-7, USD-4, Monarch and Code 2 of 7. Libraries, blood banks, photo labs and courier airbills have used it for decades.

What are the Codabar start and stop characters A, B, C and D?

Every Codabar symbol begins with one of the letters A, B, C or D and ends with one of them. They frame the data and never appear inside it. The start and stop letters do not have to match, so there are 16 possible pairs, and some systems use the pair to identify the type of label. FedEx airbills, for example, start with C and end with D. Some specifications name the four characters T, N, * and E instead.

Does Codabar have a check digit?

Not by default. Each Codabar character is self-checking, so the standard does not require a check digit. Some applications add one before the stop character, most often a modulo 16 check digit. If your labels carry one, validate it in your app after the scan.

What is the difference between Codabar and Code 39?

Codabar encodes only digits and six symbols, with A to D as start and stop characters. Code 39 also encodes the uppercase letters A to Z, a space and a few more symbols, and always starts and ends with an asterisk. Code 39 is common in industry and government labeling, while Codabar lives on in libraries, blood banks and airbills. barKoder reads both.

What are NW-7 and rationalized Codabar?

NW-7 is the name for Codabar in Japan, where it is standardized as JIS X 0503. Rationalized Codabar uses one fixed ratio between wide and narrow elements, while the original design varied the ratio so every character had the same width. Both are the same symbology with the same characters, so one decoder reads them.

Add Codabar scanning to your app

Test the SDK on your own library, blood bank and airbill labels with a free 30-day trial, or talk to an SDK expert about your project.