IT lexicon › Hardware › Guard pattern

Guard pattern

Hardware På svenska → Updated: 2026-10-02

The extra bar pairs at the start, middle and end of a UPC or EAN code that tell the scanner where the code begins, splits and ends.

In a UPC or EAN code, not every bar carries data. At the outer edges sit a left and right guard pattern (start/stop), and in the middle a longer centre pattern that splits the code into two halves. They are the guard bars. They usually extend a little below the data bars — the "hanging" bars at the ends and centre.

The patterns give the scanner fixed reference points: they define the module width, let the code be read in either direction (the left and right halves are encoded differently), and mark where the digit blocks begin. Without the guards, a scanner sweeping at an angle would not know where one digit ends and the next starts. The same idea recurs in most linear symbologies under other names.

← Back to the lexicon