Interleaved 2 of 5 is a continuous two-width barcode symbology encoding digits. It is used commercially on 135 film and on cartons of products, while the products inside are labeled with UPC or EAN.

 

I2/5 encodes pairs of digits; the first digit is encoded in the five bars ("black lines"), while the second digit is encoded in the five spaces interleaved with them ("white lines"). The digits are encoded as follows:

0 NNWWN

1 WNNNW

2 NWNNW

3 WWNNN

4 NNWNW

5 WNWNN

6 NWWNN

7 NNNWW

8 WNNWN

9 NWNWN

[Where N=Narrow "line", W=Wide "line"]

 

Before the actual pairs there is a start code consisting of NNNN, and after all symbols there is the stop code consisting of WNN.

 

As only an even number of digits can be encoded, a 0 is added as first digit. Sometimes an odd number of digits is encoded by putting five narrow spaces in the last pair.

 

A checksum can be added as last digit, which is calculated in the same way as UPC checksums.