Matrix 2 of 5 Generator

Generate Matrix 2 of 5 barcodes in your browser with live preview, validation, and PNG/SVG export.

Advanced options
Enter a value to see a live preview.
Options

These map directly to real generator options; anything not listed here is available under Advanced options above.

What Matrix 2 of 5 is

Matrix 2 of 5 is one of several historical "2 of 5" family variants (alongside Industrial, IATA, COOP, and Datalogic 2 of 5), each sharing the same 2-out-of-5-wide-bars encoding idea but with a different bar-width table. bwip-js reaches it by forcing the shared 2-of-5 encoder's own "version" option to "matrix" -- confirmed directly: bwipp_matrix2of5 sets `options.version = "matrix"` and delegates entirely to bwipp_code2of5(), the same delegation shape already used for the separately-covered Industrial 2 of 5 and IATA 2 of 5 capabilities.

Generate it now

Enter a digit-only value to see a live preview.

Valid input

The value must be 1 to 500 digits (bwipp.code2of5emptyData rejects an empty value, bwipp.code2of5inputTooLong rejects longer input); any non-digit character is rejected (bwipp.code2of5badCharacter, "Code 25 must contain only digits").

Key options

Supported options include includetext, includecheck, and height (all real options of the shared 2-of-5 encoder, genuinely reaching it because matrix2of5 forwards the caller's live options unchanged). Real, literal defaults: includetext false, includecheck false (no check digit is computed or drawn unless requested).

Output and printing

Export SVG for vector-precise label artwork or PNG for a quick proof.

Common uses

Matrix 2 of 5 saw use in some warehousing and photofinishing-envelope indexing systems; it has largely been superseded by Code 128 and Interleaved 2 of 5 in most modern workflows, but legacy equipment and processes in a handful of industries still specify it by name.

Example

See the live preview above, seeded with a bwip-js-verified valid value.

Size guidance

Each digit encodes to a fixed-width bar/space pattern; the rendered width grows linearly with the number of digits.

Troubleshooting

A rejected value usually means it contains a non-digit character, or is empty -- Matrix 2 of 5 only ever encodes digits.

Related formats

Related formats: the separately-covered Industrial 2 of 5 and IATA 2 of 5 generators -- all three reach the identical shared encoder with a different "version" forced, and are otherwise the same underlying symbology family.

FAQ

How is Matrix 2 of 5 different from Industrial 2 of 5 or IATA 2 of 5?

All three are reached through the same shared 2-of-5 encoder with a different bar-width table selected internally ("version": "matrix"/"industrial"/"iata") -- the accepted characters, length limit, and optional check-digit behavior are otherwise identical; only the specific bar-width pattern used to draw each digit differs.

Does Matrix 2 of 5 include a check digit by default?

No -- includecheck defaults to false. Turning it on computes and appends a Mod-10 check digit as one extra pair of bars.