^BE generates an EAN-13 barcode, the standard retail point-of-sale barcode used on consumer products worldwide. EAN-13 encodes exactly 13 digits — a country code prefix, manufacturer code, product code, and a check digit (automatically calculated by the printer from the first 12 digits).
EAN-13 is identical in structure to the North American UPC-A (^BU) but with an extended 13-digit format. UPC-A is a subset of EAN-13 where the country code prefix is always 0.
You supply exactly 12 digits in ^FD — the 13th digit (check character) is calculated and appended by the printer automatically. Supplying 13 digits is also accepted; the printer validates the check digit and may error if it's wrong.
The barcode includes standard guard bars and center bars that are part of the EAN-13 specification. The human-readable digits below the barcode are split around the center guard bar, which is normal.
EAN-13 barcodes are typically placed at the bottom-right corner of consumer packaging. Most scanners expect them to be a minimum of 22.85 mm × 31.35 mm (at 100% nominal size); sizing below 80% nominal risks scan failures at standard POS scanners.
Syntax
^BEo,h,f,g
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| o | N | R | I | B | N | Orientation: N = normal, R = 90°, I = 180°, B = 270°. |
| h | integer | BY default | Barcode height in dots. |
| f | Y | N | Y | Print interpretation line (human-readable digits below barcode). |
| g | Y | N | N | Print interpretation line above the barcode. |
Examples
EAN-13 for a retail product
Try in Viewer^XA ^FO50,50^BY2,3,100^BEN,100,Y,N^FD590123412345^FS ^XZ
EAN-13 rotated for narrow label
Try in Viewer^XA ^FO80,30^BY2,3,120^BER,120,Y,N^FD400638133393^FS ^XZ
Common Mistakes
- !Supplying 13 digits — you only need the first 12; the 13th check digit is calculated automatically.
- !Supplying fewer or more than 12 digits — EAN-13 requires exactly 12 data digits (13th is auto-calculated).
- !Using letters or non-digits in the data — EAN-13 is numeric only.