Skip to content
barcoder

Standards/matrix-2-of-5

Matrix 2 of 5

Type1D Linear
Completeness76%high

Overview

Matrix 2 of 5 is a variable-length, discrete, two-width, numeric-only 1D barcode in the "2 of 5" family, encoding only the digits 0–9 1, 2. It shares the family's basic rule but differs from Standard 2 of 5 in one decisive way: Matrix 2 of 5 encodes data in both the bars and the spaces, not in the bars alone 1. Each digit is represented by five elements, two wide and three narrow, and that pattern can fall in either bars or spaces — making Matrix 2 of 5 denser than Industrial 2 of 5 while remaining a discrete code 1.

It occupies a middle ground in the family: denser than the bars-only Standard 2 of 5 and IATA 2 of 5, but still less dense than the fully interleaved ITF, because as a discrete symbology it needs separating gaps between character patterns 1.

History

Matrix 2 of 5 was developed in the 1970s by Nieaf Co. in the Netherlands 1. It was created during the same early-1970s flowering of "2 of 5" symbologies that produced Standard 2 of 5 (Identicon / Computer Identics, 1971), ITF (David Allais, 1972) and IATA 2 of 5 (Computer Identics, 1974).

The family's shared "2 of 5" rule — five elements per digit, two wide — is the common thread. Matrix 2 of 5's contribution was to push that rule into the spaces as well as the bars, recovering some of the density lost by the bars-only ancestors without going as far as full interleaving 1.

Technical specification

Matrix 2 of 5 is a discrete, numeric-only, variable-length 1D symbology 1, 2:

Parameter Value
Symbology family 1D linear, "2 of 5" family
Character set Digits 0–9 only
Length Variable
Encoding Data in bars AND spaces — each digit = 5 elements, 2 wide + 3 narrow, in bars or spaces; digits effectively paired (5 bars + 5 spaces → 2 digits) 1
Discrete Yes — extra inter-character space separates patterns 1
Self-checking No
Check digit Optional, Mod 10 / weight 3 (other schemes also usable) 1
Start pattern WNNNN (wide–narrow–narrow–narrow–narrow) 1
Stop pattern WNNNN (same as start) 1
Narrow:wide ratio ~1:2 to 2:5 1
Quiet zone 10 × narrow-element width each side 1
Density ~11 % longer than ITF; ~82 % longer than Code 128 1

Data in bars and spaces 1: this is the distinguishing feature. Where Standard 2 of 5 confines data to the bars and leaves spaces as uniform separators, Matrix 2 of 5 puts the wide/narrow 2-of-5 pattern into both bars and spaces — three black bars plus two white spaces per digit pattern, with the same wide/narrow ratio applied to spaces as to bars. This roughly halves the wasted width of the bars-only design, which is why Matrix 2 of 5 is denser than Industrial 2 of 5 1.

Why it is still less dense than ITF 1: Matrix 2 of 5 is a discrete symbology — each character pattern is self-contained and separated from the next by additional space. Interleaved 2 of 5 is continuous and interleaved, with no wasted inter-character gaps, so ITF stays ~11 % shorter than Matrix 2 of 5 for the same data.

Check digit 1: an optional Mod-10 (weight-3) check digit is typical, though implementations may substitute other checksum schemes.

Use cases

Matrix 2 of 5's historical deployments overlap heavily with the rest of the family 1:

  • Warehouse sorting — numeric item/bin identifiers on conveyors and shelving.
  • Photo finishing — order and batch numbering through the develop-and-print workflow.
  • Airline ticket marking — sequential and identifier numbering on tickets.

Its denser-than-Industrial-2-of-5 layout made it attractive where label width was constrained but full interleaving (ITF) was not yet adopted.

Implementations

Matrix 2 of 5 survives as a legacy format in barcode libraries and scanner SDKs 1, 3, 5:

  • C — zint/zint — ~771★, active 2026. Lists "Code 2 of 5 Standard (Matrix)" among supported symbologies.
  • JavaScript — bwip-js (BWIPP) exposes matrix2of5.
  • Commercial — Accusoft Barcode Xpress, DevExpress Office File API, and Seagull/BarTender all include Matrix 2 of 5; "most barcode readers support this symbology" 1.
  • Reference docs — DevExpress and Raynet RayVentory document Matrix 2 of 5 in their barcode-generation APIs 4.

Comparison

vs. Standard 2 of 5 (Industrial 2 of 5) — the defining contrast within the family. Industrial 2 of 5 encodes data in the bars only; Matrix 2 of 5 encodes data in both bars and spaces, making it denser than Industrial 2 of 5 while still discrete 1.

vs. Interleaved 2 of 5 (ITF) — both use bars and spaces for data, but ITF interleaves two digits continuously with no inter-character gaps, whereas Matrix 2 of 5 is discrete and needs separating space — leaving Matrix ~11 % longer than ITF for the same payload 1. ITF is the density winner.

vs. IATA 2 of 5 — IATA 2 of 5, like Standard 2 of 5, is bars-only and differs from Standard only in start/stop; Matrix 2 of 5 is the denser bars-and-spaces member of the family 1.

Family density ranking (most to least dense, numeric data): ITF > Matrix 2 of 5 > Standard 2 of 5 / IATA 2 of 5 1.

Status

Legacy / niche. Matrix 2 of 5 is no longer chosen for new deployments but remains supported by barcode-generation libraries (zint, bwip-js) and commercial SDKs (Accusoft, DevExpress, Seagull/BarTender), and most scanners still decode it 1, 3, 4, 5. For new numeric applications, ITF (higher density) or Code 128 (alphanumeric) are the standard replacements.

Sources

  1. Matrix 2 of 5 — Wikipedia
  2. Matrix 2 of 5 — HandWiki
  3. Matrix 2 of 5 Barcodes — Accusoft Barcode Xpress
  4. Matrix 2 of 5 — DevExpress Office File API
  5. zint/zint — GitHub

Deployments

No country reports mention this standard by name.

Regions / aggregations not mapped to a single country

  • Universal
source · content/standards/matrix-2-of-5/index.md