Codabar Barcode Generator API
Legacy format for libraries and blood banks
Sample Codabar barcode
Generated live by the BarGen API from A12345678B
Codabar is a self-checking linear barcode symbology standardized as ISO/IEC 16388. Each symbol starts and stops with one of four unique characters (A, B, C, or D), which lets scanners read the code in either direction without ambiguity. The character set covers digits 0-9 and six symbols: hyphen, dollar sign, colon, slash, period, and plus. Because Codabar predates GS1 retail standards and needs no check digit for reliable decoding, it remains common in sectors that adopted barcoding early and never migrated to newer symbologies.
BarGen generates Codabar codes through a single REST call: send the data string with the format parameter set to codabar and receive SVG for print-ready vector output or PNG for raster previews and thumbnails. Start and stop characters can be supplied explicitly or added automatically, and bar width, height, and quiet zones are configurable per request.
Codabar, also known as NW-7 or USD-4, was developed in 1972 by Pitney Bowes. It was one of the first barcode symbologies to be widely adopted and remains in use today in specific industries.
The symbology uses a simple encoding scheme with 4 different bar widths. It can encode digits 0-9 and six special characters (- $ : / . +). Four start/stop characters (A, B, C, D) are used to mark the beginning and end of the barcode.
While Codabar has been largely superseded by more modern barcodes in many applications, it remains the standard in certain fields due to legacy system requirements and the cost of transitioning to new formats.
Primary applications include blood banks, photo labs, FedEx airbills, and library systems. The American Blood Commission adopted Codabar as the standard for blood identification in 1977.
Common use cases
Library circulation systems
Many library management systems still print Codabar on library cards and book spine labels because early automation vendors standardized on it in the 1980s and replacement costs are high.
Blood bank and specimen labeling
Some blood banks and diagnostic labs still rely on Codabar for sample tubes and donor records, valued for its self-checking start and stop character pair.
Courier and photo processing tags
Older air waybill and photo-finishing tracking tags use Codabar because its numeric-plus-symbol character set was sufficient before Code 128 became the logistics default.
Generate Codabar via the REST API
curl "https://api.bargen.pro/v1/barcode/codabar?data=A12345678B&format=svg" \
-H "X-API-Key: YOUR_API_KEY"
Returns the barcode as SVG. See the API documentation for all options.
Frequently asked questions
Does Codabar need a check digit?
No. Codabar is self-checking by design because its start and stop characters and bar patterns cannot be misread as another valid character, so most implementations skip a separate check digit, though some legacy systems add a modulo 16 digit for extra validation.
Which characters can Codabar encode?
Codabar supports digits 0-9 and six special characters: hyphen, dollar sign, colon, slash, period, and plus. Letters A through D are reserved exclusively for the start and stop characters and cannot appear inside the data.
Is Codabar still recommended for new projects?
Generally no. Code 128 or GS1-128 encode the same data in less space and align with current retail and logistics standards, so Codabar is best reserved for compatibility with existing legacy scanners and label formats.
Start generating Codabar barcodes
Free tier with 1,000 API calls per month. No credit card required.