Code 128 alphanumeric logistics barcode

Linear symbology

Code 128 Encoding: Sets A/B/C, Modulo-103 & Logistics Use

Code 128 is the default linear carrier for warehouse IDs, carton license plates, and mixed alphanumeric strings. Encoders switch among three code sets so the same human string can become a shorter or longer bar pattern.

Generate Code 128

Three code sets

You do not pick "Set B" in Qrivio. You type the string; the library chooses an efficient encoding and may switch mid-symbol. Knowing the sets explains why long digit runs look denser than mixed text.

A

Set A

Uppercase, digits, punctuation, and many control characters. Useful when you need controls without lowercase.

B

Set B

Everyday alphanumeric: upper and lower case, digits, common punctuation. Typical for SKU text like Abc-12.

C

Set C

Digits only, two digits per symbol character (values 00-99). Long numeric runs shrink versus A/B.

Set C pairing example

Take 123456. In Set B that is six separate symbol characters for six digits (plus start, check, and stop around the data). In Set C the encoder pairs them as 12, 34, and 56 -- three symbol characters for the same six digits.

Set C (paired)

12 34 56

Six digits as three symbol characters -- shorter bars at the same X dimension.

Set B (one-by-one)

1 2 3 4 5 6

Same data, twice as many data characters before start/check/stop overhead.

Odd-length digit runs need a brief return to A/B (or a leading-zero strategy inside the encoder) for the leftover digit. Good libraries handle that when they optimize. For 123456789012, Set C can represent twelve digits as six pairs -- which is why logistics teams prefer Code 128 for dense numeric license plates once handhelds support it.

Modulo-103 check character

Every Code 128 symbol includes a check character the scanner verifies. Conceptually: assign each symbol character a value, multiply by its position weight (start character weight 1, then data characters 1, 2, 3...), sum, then take modulo 103. This check is structural to the symbol -- separate from any GS1 application-identifier content in the string.

Toy Set C sum Start Code C has value 105. Encoding the pair 12 uses data value 12 at weight 1. Weighted sum = 105x1 + 12x1 = 117. Check value = 117 mod 103 = 14.

What you type Humans rarely compute this. Qrivio draws bars for the exact characters you enter; the library embeds the correct Modulo-103 character automatically.

Worked string: ABC-12345

Mixed letters, hyphen, and digits typically stay in Set B for the letters and punctuation, with an optional Set C switch if the encoder decides digit pairs help. The human-readable caption matches the payload; start/stop and check are not shown as typed text.

Prefix ABC-
Digits 12345
Next in batch ABC-12346 trailing run +1

On Qrivio, sequential batches (count 2-10) increment only the trailing digit run and keep digit width. They do not append the count onto the string. See the multiple barcodes how-to.

FNC1 and GS1-128 (boundary)

GS1-128 is Code 128 used with GS1 element strings (AIs such as GTIN, batch, expiry). It often begins with Function Code 1 (FNC1). Building parenthesized AI text for humans ((01)..., (10)...) and producing a machine string with FNC1 separators is a data-composition job.

Use Payload expectation Qrivio behaviour
Plain Code 128 Any agreed warehouse string (ABC-12345, license plates) Encodes the characters you type
GS1-128 AI rules + FNC1 separators as your WMS already emits Does not invent AI parentheses or insert FNC1 for you
Case GTIN Often a separate ITF-14 on corrugated Complementary job -- not interchangeable with Code 128 text

If your WMS already outputs the correct GS1-128 payload, paste that payload. Do not assume typing a friendly (01)123... label will auto-build a compliant GS1-128 symbol.

Common mistakes

Lowercase on Code 39 migration Code 39 is uppercase-only in basic mode. Moving mixed-case SKUs to Code 128 is correct -- but enable Code 128 on handhelds before you change the label template.

No trailing digits in a batch Strings like CARTON-A cannot sequence when count is greater than one. Add a numeric suffix such as 001.

Quiet-zone crop SVG and PNG exports include padding; do not trim flush to the first bar in packaging artwork.

Confusing check types Modulo-103 is inside the symbol. It is not a GS1 GTIN check digit and not an MSI Mod-10 you type into the data field.

2026 Copyright © Qrivio Barcode | All rights reserved.