# LOGMARS

> Source: https://docs.barcoder.ai/docs/standards/logmars
> research date 2026-10-03 · extracted at 2026-10-03
> Publisher: Barcoder — encyclopedia of QR, barcode and payment-code standards

Specifications:
- [MIL-STD-1189B — Standard Department of Defense Bar Code Symbology (10 Aug 1989)](https://everyspec.com/MIL-STD/MIL-STD-1100-1299/MIL-STD-1189B_16697/)
- [GSA — MIL-STD-129R Marking and Shipping Label Requirements (Nov 2014)](https://vsc.gsa.gov/drupal/sites/default/files/internal-files/InstructionsMilitaryStandard129Compliance.pdf)

## Overview

**LOGMARS** (**Logistics Applications of Automated Marking and Reading Symbols**) is the United States Department of Defense (DoD) application profile of [Code 39](https://docs.barcoder.ai/docs/standards/code-39), used to mark material and shipments in the military supply chain <sup>[3][3]</sup><sup>[5][5]</sup><sup>[6][6]</sup>. 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 <sup>[1][1]</sup><sup>[5][5]</sup>. Commercial encoders implement LOGMARS as Code 39 with a **modulo-43 check character** always appended <sup>[5][5]</sup><sup>[6][6]</sup><sup>[7][7]</sup>.

## History

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

## 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 <sup>[1][1]</sup>.

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

**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 <sup>[1][1]</sup>. Vendor implementations of "LOGMARS" make the mod-43 check **mandatory** and always append it <sup>[5][5]</sup><sup>[6][6]</sup><sup>[7][7]</sup>.

**NSN example.** The standard shows a National Stock Number written `5960-00-127-4329`. Only the 13 digits are bar coded, giving `5960001274329` <sup>[1][1]</sup>. 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](https://docs.barcoder.ai/docs/standards/code-39-extended)) <sup>[1][1]</sup>. Multiple symbols must sit 0.375–0.75 in apart when stacked, or at least 0.5 in apart in-line <sup>[1][1]</sup>.

## Use cases

- **Defense supply-chain marking.** LOGMARS is the US government specification for marking military goods <sup>[7][7]</sup>. It was applied to all products sold to the US military from 1981 <sup>[3][3]</sup>.
- **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 <sup>[6][6]</sup><sup>[7][7]</sup>. 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 <sup>[9][9]</sup><sup>[10][10]</sup>.
- **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 <sup>[1][1]</sup>.
- **Corrugated shipping cartons.** The standard gives direct-print rules for corrugated fiberboard: X ≥ 0.020 in, ratio ≥ 2.5:1, and optional bearer bars <sup>[1][1]</sup>.

## Implementations

- **[zint](https://github.com/zint/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 <sup>[11][11]</sup>.
- **[tc-lib-barcode](https://github.com/tecnickcom/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 <sup>[5][5]</sup>.
- **[bwip-js](https://github.com/metafloor/bwip-js)**: JavaScript, ~2.4k stars, active August 2026. It has no LOGMARS type, but its `code39` symbology can render LOGMARS data <sup>[12][12]</sup>. Barcoder's playground uses it with the check character already added.
- **[ZXing](https://github.com/zxing/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 <sup>[8][8]</sup>.

## Comparison

- **LOGMARS vs. plain [Code 39](https://docs.barcoder.ai/docs/standards/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 <sup>[1][1]</sup>. Software implementations also make the mod-43 check mandatory <sup>[5][5]</sup><sup>[7][7]</sup>. 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](https://docs.barcoder.ai/docs/standards/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 <sup>[10][10]</sup>. 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 <sup>[10][10]</sup>. MIL-STD-129R allows "PDF417 symbols and/or linear bar codes", so field units with simple linear scanners are still supported <sup>[10][10]</sup>.
- **LOGMARS vs. [MIL-STD-130 IUID](https://docs.barcoder.ai/docs/standards/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 <sup>[1][1]</sup><sup>[9][9]</sup>. MIL-STD-1189B already pointed to MIL-STD-130 for permanent-marking methods <sup>[1][1]</sup>.

## 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 <sup>[1][1]</sup>.
- 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 <sup>[11][11]</sup>.

## Status

**Superseded as a standard, still used in practice.** MIL-STD-1189B is cancelled and was replaced by AIM-BC1 <sup>[2][2]</sup><sup>[4][4]</sup>. 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 <sup>[9][9]</sup>, and MilPac says "Mil-Std-129 requires the use of the Code39 symbology for linear bar codes" <sup>[10][10]</sup>. Encoders (zint, tc-lib-barcode) and label tools (FastReport, Dataflex, PrecisionID) still ship LOGMARS as a named type <sup>[5][5]</sup><sup>[6][6]</sup><sup>[7][7]</sup><sup>[8][8]</sup><sup>[11][11]</sup>.

## Sources

[1] [MIL-STD-1189B — Standard Department of Defense Bar Code Symbology (10 Aug 1989, PDF)](https://everyspec.com/MIL-STD/MIL-STD-1100-1299/download.php?spec=MIL-STD-1189B.016697.PDF) — US DoD via EverySpec, accessed 2026.
[2] [MIL-STD-1189B listing (status: cancelled, S/S by AIM-BC1)](https://everyspec.com/MIL-STD/MIL-STD-1100-1299/MIL-STD-1189B_16697/) — EverySpec, accessed 2026.
[3] [AIM 1980's](https://www.aimglobal.org/aim-1980/) — AIM Global, accessed 2026.
[4] [Code 39](https://en.wikipedia.org/wiki/Code_39) — Wikipedia, accessed 2026.
[5] [Com\Tecnick\Barcode\Type\Linear\Logmars](https://tcpdf.org/docs/srcdoc/tc-lib-barcode/classes-Com-Tecnick-Barcode-Type-Linear-Logmars/) — tc-lib-barcode docs (tcpdf.org), accessed 2026.
[6] [LOGMARS](https://docs.dataflex.dev/reports/explanations/barcode-types/logmars/) — DataFlex Reports documentation, accessed 2026.
[7] [How to set up the LOGMARS barcode in FastReport .NET](https://fast-report.com/blogs/logmars-barcode-in-fastreport-net) — Fast Reports, accessed 2026.
[8] [Code39Reader.java](https://github.com/zxing/zxing/blob/master/core/src/main/java/com/google/zxing/oned/Code39Reader.java) — GitHub (zxing/zxing), accessed 2026.
[9] [Military Standard 129R Marking and Shipping Label Requirements (Nov 2014)](https://vsc.gsa.gov/drupal/sites/default/files/internal-files/InstructionsMilitaryStandard129Compliance.pdf) — US General Services Administration, accessed 2026.
[10] [Mil-Std-129R](https://milpac.com/dod-compliance/mil-std-129r/) — MilPac, accessed 2026.
[11] [zint backend/code.c](https://github.com/zint/zint/blob/master/backend/code.c) — GitHub (zint/zint), accessed 2026.
[12] [bwip-js README](https://github.com/metafloor/bwip-js) — GitHub (metafloor/bwip-js), accessed 2026.
[13] [Code 39 glossary entry](https://cybra.com/?p=93856) — CYBRA, accessed 2026.

[1]: https://everyspec.com/MIL-STD/MIL-STD-1100-1299/download.php?spec=MIL-STD-1189B.016697.PDF
[2]: https://everyspec.com/MIL-STD/MIL-STD-1100-1299/MIL-STD-1189B_16697/
[3]: https://www.aimglobal.org/aim-1980/
[4]: https://en.wikipedia.org/wiki/Code_39
[5]: https://tcpdf.org/docs/srcdoc/tc-lib-barcode/classes-Com-Tecnick-Barcode-Type-Linear-Logmars/
[6]: https://docs.dataflex.dev/reports/explanations/barcode-types/logmars/
[7]: https://fast-report.com/blogs/logmars-barcode-in-fastreport-net
[8]: https://github.com/zxing/zxing/blob/master/core/src/main/java/com/google/zxing/oned/Code39Reader.java
[9]: https://vsc.gsa.gov/drupal/sites/default/files/internal-files/InstructionsMilitaryStandard129Compliance.pdf
[10]: https://milpac.com/dod-compliance/mil-std-129r/
[11]: https://github.com/zint/zint/blob/master/backend/code.c
[12]: https://github.com/metafloor/bwip-js
[13]: https://cybra.com/?p=93856

## Deployments

_No country reports mention this standard by name._
