What is a start/stop character?

A start character marks the beginning of a linear barcode and a stop character marks the end. Together they're sometimes called sentinels - they bracket the data so a scanner can:

  • Find the symbol on the page - the scanner sweeps the beam, sees the quiet zone transition into the start pattern, and locks on.
  • Detect orientation - the start and stop patterns are deliberately asymmetric so the scanner can tell whether the beam crossed the symbol left-to-right or right-to-left, and reverse the decoded string if needed.
  • Select the character set (Code 128 only) - three different start codes pick which of the three character subsets (A, B, or C) the decoder should apply to the data that follows.
  • Refuse a partial read - if the decoder doesn't see both a valid start and a valid stop, it discards the scan. That's a feature: it stops a half-read barcode being treated as a short, valid one.

The four conventions

How the start and stop are realised varies a lot from one symbology to the next. Four distinct conventions cover almost every linear barcode you'll meet:

ConventionUsed byVisible in HRI?Carries data?What it does
Visible sentinelCode 39, LOGMARSYes - printed as *NoSame * character at both ends, just a delimiter.
Encoded data characterCodabarYes - one of A B C DYes - chosen by encoderThe encoder picks the start/stop pair; the choice carries application meaning.
Silent character-set selectorCode 128, GS1-128No - not shownNo data, but selects subsetStart A, B, or C picks the active character set; not part of the encoded payload.
Guard patternEAN-13, EAN-8, UPC-A, UPC-ENo - no character at allNo A fixed three-module 101 bar pattern, not a character. See guard pattern .

Where the sentinels sit on the printed symbol

Three schematics, same scale, showing where the start and stop bracket the encoded data. The dark grey bands are start/stop; the light grey band is the data region; the white margin on each side is the quiet zone .

Code 39 - visible * sentinelThe asterisk is printed in the HRI text under the bars.
*A B C*
Codabar - A/B/C/D as encoded dataThe encoder picks the start/stop pair; they show in the HRI.
A1 2 3 4 5B
Code 128 - silent Start A/B/CStart code is encoded in bars but not shown in the HRI.
A B C

Note what changes in the HRI (the human-readable text under the bars). Code 39 prints the asterisks. Codabar prints the chosen start/stop letters. Code 128 prints only the data - the start and stop are in the bars but never shown to humans.

Per-symbology detail

Code 39 and LOGMARS - visible *

Code 39 (ISO/IEC 16388) and its US Department of Defense profile LOGMARS (MIL-STD-1189B) use the asterisk * as both start and stop. The asterisk is one of the 44 patterns Code 39 can encode, but it is reserved - the data may contain digits, letters, and the seven symbol characters - . $ / + % space, but never an asterisk. Most printers and encoders add the asterisks for you. They typically appear in the HRI text below the bars, framing the data: *HELLO*.

Both ends use the same character pattern (*); orientation detection relies on the asymmetric internal element pattern of the asterisk itself.

Codabar - A, B, C, or D

Codabar (ANSI/AIM BC3) has four start/stop characters: A, B, C, D (sometimes written a, b, c, d or t, n, *, e in older spec text). Unlike Code 39, the encoder chooses the start and stop characters for each symbol, and the choice carries meaning to the receiving application.

Codabar was the de-facto standard for blood-bank labels, library cards, and FedEx air-waybills for decades; each industry adopted its own A/B/C/D convention to mark which kind of identifier follows. For example, a library system might use A...B for borrower IDs and C...D for book IDs so the scanner software can route the read appropriately.

Code 128 and GS1-128 - silent Start A / B / C

Code 128 (ISO/IEC 15417) has three different start codes, each silently selecting which of the three character subsets the decoder should apply:

  • Start A (code value 103) - selects subset A (upper-case ASCII, digits, control characters).
  • Start B (code value 104) - selects subset B (upper- and lower-case ASCII, digits, symbols).
  • Start C (code value 105) - selects subset C (digit pairs 00-99, doubling data density for numeric payloads).

A single stop pattern (value 106) ends every Code 128 symbol regardless of which start was used. None of these appear in the HRI; you only see the decoded data. GS1-128 is exactly the same wire format with the additional rule that the symbol must begin Start C + FNC1 or Start B + FNC1 to flag it as a GS1 symbol.

EAN/UPC - guard patterns, not characters

EAN-13 , EAN-8 , UPC-A and UPC-E don't have start/stop characters in the strict sense. They have guard patterns: fixed three-module 101 bar patterns at the left, centre, and right of the symbol. The guards are part of the symbology specification (not data) and are documented on the dedicated guard pattern page.

Functionally guards do the same job - bracket the data, enable orientation detection, let the scanner self-calibrate - but they're a property of the bar layout, not characters drawn from the symbology's alphabet.

Why orientation detection works

A 1D scanner doesn't know in advance which way round the symbol is presented. Both end patterns must therefore be distinguishable when read in reverse - otherwise an upside-down scan would silently decode as a different, equally valid symbol.

The start/stop element patterns achieve this in different ways. Code 128 uses different patterns at each end (start vs stop), and the start has internal asymmetry that uniquely identifies its forward direction. Code 39 uses the same asterisk at both ends, but the asterisk's nine-element pattern reads differently in reverse, so the decoder can still tell forward from backward. EAN/UPC uses identical guards at both ends but relies on the L-code / R-code parity choice in the data halves to detect orientation - the left half uses odd-parity L-codes and the right half uses even-parity R-codes.

Related