Skip to content
barcoder

Standards/logmars

LOGMARS

Type1D Linear (Code 39)
PrimaryUS
Completeness81%high

Overview

LOGMARS (Logistics Applications of Automated Marking and Reading Symbols) is the United States Department of Defense (DoD) application profile of Code 39, used to mark material and shipments in the military supply chain 356. The profile was codified in MIL-STD-1189, Standard Department of Defense Bar Code Symbology. It keeps the 43-character Code 39 set and constrains density, wide-to-narrow ratio, bar height, quiet zones, print contrast and message length 15. Commercial encoders implement LOGMARS as Code 39 with a modulo-43 check character always appended 567.

History

  • On 1 September 1981 the DoD adopted Code 39 for marking all products sold to the US military, under a system called LOGMARS 3. In 1982 the DoD required about 50,000 of its suppliers to put Code 39 symbols on new procurements 3. AIM describes this military adoption as what pushed the bar code into many later industrial applications 3.
  • MIL-STD-1189A was dated 4 September 1984. MIL-STD-1189B, dated 10 August 1989, superseded it 1. The revision note in 1189B says the changes were so extensive that change bars were left out 1. The standard's preparing activity was the Army's Packaging, Storage and Containerization Center in Tobyhanna, Pennsylvania 1.
  • Over the same period, Code 39 was also standardized in civilian form as ANSI MH10.8M-1983 413.
  • MIL-STD-1189B is now cancelled. EverySpec lists it as superseded by AIM-BC1 (Notice 1, June 1997) 2. Wikipedia names the replacement as ANSI/AIM BC1/1995, Uniform Symbology Specification — Code 39 4.

Technical specification

MIL-STD-1189B calls the symbology the Standard DoD Bar Code Symbology (SDS), the "3 of 9 bar code" (Code 39) with human-readable interpretation 1.

Parameter MIL-STD-1189B requirement
Symbology Code 39: variable-length, discrete, self-checking, bidirectional, alphanumeric 1
Character set 43 characters: 0–9, A–Z, -, ., $, /, +, %, space. * is start/stop 1
Character structure 9 elements (5 bars + 4 spaces), of which 3 are wide 1
Example densities 9.4 CPI (high), 5.7 CPI (medium), 3.0 CPI (low). Above 9.4 CPI only for closed-loop/special use 1
Narrow element (X) 0.0075–0.020 in (0.190–0.508 mm) for general use. 0.0044–0.040 in for special applications 1
Wide:narrow ratio 2.0–3.0:1 depending on X. 3.0:1 preferred. Measured ratio must not exceed 3.3:1 1
Bar height (general) 0.25–0.50 in at 6.5–9.4 CPI; 0.375–0.875 in at 3.0–6.5 CPI; 0.75–1.25 in at 1.7–3.0 CPI 1
Quiet zones 10X or 0.25 in, whichever is greater. Never less than 0.125 in 1
Intercharacter gap Min X, max 3X 1
Message length Max 30 data characters. Max 32 including start/stop and control characters 1
Print quality Min print contrast signal (PCS) 75 %. Readable in the 633–900 nm scanner bands 1
Human-readable (HRI) Encoded characters only, no asterisks, min 0.094 in high, preferably below the bars 1
Acceptance ≥97 % of symbols in a shipment read within 3 wand attempts or 2 laser attempts 1

Check character. MIL-STD-1189B makes the check character optional. Code 39 is "strongly checked", so most applications do not need one. When a check is used, it is the modulo-43 sum of the character values (0–9 = 0–9, A–Z = 10–35, - = 36, . = 37, space = 38, $ = 39, / = 40, + = 41, % = 42), printed as the last data character 1. Vendor implementations of "LOGMARS" make the mod-43 check mandatory and always append it 567.

NSN example. The standard shows a National Stock Number written 5960-00-127-4329. Only the 13 digits are bar coded, giving 5960001274329 1. The playground sample adds the mod-43 check character (digit sum 48, 48 mod 43 = 5): 59600012743295.

Optional features. The standard also defines broken messages, where a leading space tells the reader to buffer a segment and join it with the next, and a full-ASCII mode that uses $ / % + as shift characters. Full-ASCII is limited to internal closed-loop operations (Code 39 Extended) 1. Multiple symbols must sit 0.375–0.75 in apart when stacked, or at least 0.5 in apart in-line 1.

Use cases

  • Defense supply-chain marking. LOGMARS is the US government specification for marking military goods 7. It was applied to all products sold to the US military from 1981 3.
  • Military shipping containers (MIL-STD-129). MIL-STD-129 sets where bar codes go on military cargo and what data they carry and at what length 67. Under MIL-STD-129R, exterior containers, palletized unit loads and unpacked items carry machine-readable bar codes with the NSN/NATO stock number, contract or order number, CAGE code, CLIN, contractor shipment number and UIIs. Code 39 is the linear symbology for these marks 910.
  • Direct marking of parts. MIL-STD-1189B covers permanent marking (laser etching, photo-imaging) for items whose bar code must last as long as the item. It gives a 9.4 CPI, 0.016 in-high code etched on a circuit-board edge as an example of a special case 1.
  • Corrugated shipping cartons. The standard gives direct-print rules for corrugated fiberboard: X ≥ 0.020 in, ratio ≥ 2.5:1, and optional bearer bars 1.

Implementations

  • zint: C, ~810 stars, active October 2026. It has a dedicated BARCODE_LOGMARS symbology that enforces the MIL-STD-1189B 30-character limit, folds input to uppercase, uses wider (3:1) wide bars than plain Code 39, sets MIL-STD-1189B heights in compliant-height mode, and offers an optional mod-43 check digit 11.
  • tc-lib-barcode: PHP, ~299 stars, active October 2026. Its Logmars class is "CODE 39 profile of MIL-STD-1189B". It extends the Code 39-with-check class, folds lowercase to uppercase and always appends the mod-43 check. Density, ratio and height are left to the caller 5.
  • bwip-js: JavaScript, ~2.4k stars, active August 2026. It has no LOGMARS type, but its code39 symbology can render LOGMARS data 12. Barcoder's playground uses it with the check character already added.
  • ZXing (decoder): Java, ~34.1k stars, active September 2026. Code39Reader(usingCheckDigit) treats the last data character as a mod-43 check digit, which is how LOGMARS symbols are verified on decode 8.

Comparison

  • LOGMARS vs. plain Code 39. The character set and bar patterns are the same. LOGMARS adds DoD rules for density (3.0–9.4 CPI for general use), ratio (3:1 preferred), height, quiet zones, contrast, a 30-character cap and HRI layout 1. Software implementations also make the mod-43 check mandatory 57. Choose LOGMARS settings when the label goes to a DoD receiving point. Use generic Code 39 for internal or commercial labels.
  • LOGMARS (linear) vs. PDF417 under MIL-STD-129. MIL-STD-129P Notice 4 introduced PDF417 for container identification. Unique Identification (UID) strings can run to about 50 characters, which is impractical in linear Code 39 10. One PDF417 symbol can hold all the data formerly linear-coded (NSN, contract, CLIN, CAGE, shipment number) plus up to five serial numbers or UIDs 10. MIL-STD-129R allows "PDF417 symbols and/or linear bar codes", so field units with simple linear scanners are still supported 10.
  • LOGMARS vs. MIL-STD-130 IUID. LOGMARS identifies stocked items and shipments by NSN and contract data. Item-level unique identification of parts is governed by MIL-STD-130 19. MIL-STD-1189B already pointed to MIL-STD-130 for permanent-marking methods 1.

Fun facts

  • MIL-STD-1189B gives an HRI rule for NSNs: the dashes in 5960-00-127-4329 are dropped and only the 13 digits are encoded 1.
  • A comment in zint's source cites a DTIC-hosted copy of MIL-STD-1189 Rev. B for the 30-character limit and the default bar height. The default is the average of the standard's 0.375–0.875 in height range divided by the average of its 0.0075–0.020 in X range, about 45.45 modules 11.

Status

Superseded as a standard, still used in practice. MIL-STD-1189B is cancelled and was replaced by AIM-BC1 24. The civilian Code 39 specification now carries the symbology rules. The marking practice continues through MIL-STD-129R. GSA's November 2014 compliance guide still lists linear Code 39 fields for exterior containers alongside the PDF417 symbol on the Military Shipping Label 9, and MilPac says "Mil-Std-129 requires the use of the Code39 symbology for linear bar codes" 10. Encoders (zint, tc-lib-barcode) and label tools (FastReport, Dataflex, PrecisionID) still ship LOGMARS as a named type 567811.

Sources

1 MIL-STD-1189B — Standard Department of Defense Bar Code Symbology (10 Aug 1989, PDF) — US DoD via EverySpec, accessed 2026. 2 MIL-STD-1189B listing (status: cancelled, S/S by AIM-BC1) — EverySpec, accessed 2026. 3 AIM 1980's — AIM Global, accessed 2026. 4 Code 39 — Wikipedia, accessed 2026. 5 Com\Tecnick\Barcode\Type\Linear\Logmars — tc-lib-barcode docs (tcpdf.org), accessed 2026. 6 LOGMARS — DataFlex Reports documentation, accessed 2026. 7 How to set up the LOGMARS barcode in FastReport .NET — Fast Reports, accessed 2026. 8 Code39Reader.java — GitHub (zxing/zxing), accessed 2026. 9 Military Standard 129R Marking and Shipping Label Requirements (Nov 2014) — US General Services Administration, accessed 2026. 10 Mil-Std-129R — MilPac, accessed 2026. 11 zint backend/code.c — GitHub (zint/zint), accessed 2026. 12 bwip-js README — GitHub (metafloor/bwip-js), accessed 2026. 13 Code 39 glossary entry — CYBRA, accessed 2026.

Deployments

No country reports mention this standard by name.

source · content/standards/logmars/index.md