Interleaved 2 of 5 barcode generator
Interleaved 2 of 5 packs digits two at a time: the first is carried by five bars, the second by the five spaces between them. That interleaving is where the density comes from — it is one of the tightest purely numeric symbologies in common use — and it is also the source of the one failure that matters. Because the code is continuous and has no self-checking structure, a beam that enters or leaves the symbol part way through can return a shorter number that is entirely well-formed. The reader has no way to know it saw half a code. Everything below is about closing that door.
Appearance
304 × 237 px in the PNG
Specification
- Character set
- digits
- Length
- from 2 to 30 characters
- Check digit
- not used by this symbology
Generate Interleaved 2 of 5 barcodes in bulk
Got a whole list of values rather than one? Generate Interleaved 2 of 5 barcodes in bulk
Where it is used
- Warehouse and distribution labelling where the number is long, the space is narrow and the data is purely numeric
- Industrial marking on rough surfaces — corrugated board, moulded plastic, painted metal — where a coarse module survives and a fine one does not
- Internal part and location numbering in systems that predate GS1 conventions and are not going to be rewritten
- Photofinishing, ticketing and film numbering, where the symbology has been embedded in equipment for decades
How it compares
ITF-14 is Interleaved 2 of 5 with the dangerous parts nailed down: fourteen digits, no more and no less, a mandatory check digit, and bearer bars around the symbol. Everything that makes plain ITF risky — free length, optional check digit, optional frame — is fixed there by specification, which is why a case code is an ITF-14 and not a bare ITF. Against Code 128 the trade is density against safety: Code 128 in its numeric mode is nearly as compact, encodes letters as well, and is far harder to misread short because its structure is self-checking. If you are choosing a symbology today for something new and it is not dictated by an existing system, Code 128 is usually the better answer. Plain ITF earns its place when equipment already expects it, or when the surface is so coarse that only the widest modules survive.
Common mistakes
- Encoding an odd number of digits. Digits go in pairs by construction, so an odd count cannot be encoded at all. Most software silently prefixes a zero, which changes the number: 12345 becomes 012345, and whether that matters depends entirely on the system reading it. Decide deliberately where the padding digit goes rather than discovering later that it went somewhere else.
- Leaving out the bearer bars. The frame around the symbol is not decoration. It stops a beam that crosses the code at an angle from starting or finishing between two digit pairs, which is precisely how a short read happens. On a symbol this long the frame is the difference between a scan that fails and a scan that lies.
- Skipping the check digit because the symbology does not require one. It does not, and that is the problem. Without it, a truncated read produces a number that is structurally perfect and numerically wrong. A modulo 10 check digit is the cheapest protection available, and on any symbol whose digits are not fixed in length it is close to mandatory in practice.
- Printing it at retail dimensions. Interleaved 2 of 5 is usually chosen for surfaces that print badly, and then shrunk to fit the artwork. Ink spread thickens every bar and thins every space by the same amount; since the decoder distinguishes elements only by width, past a point a wide space reads as a narrow one. The result is a code that scans on the third attempt, which nobody blames on the artwork.
- Assuming a fixed length at the reader. Many scanners default to accepting ITF of any even length, which is what makes short reads dangerous. If your system only ever uses, say, sixteen digits, configuring the reader to accept only sixteen removes the entire class of failure at no cost.
Frequently asked questions
- Why must the digit count be even?
- Because digits are encoded in pairs — one digit in the bars, the next in the spaces between them — so a lone digit has nothing to interleave with. If your number is odd in length, a padding zero is added; where it goes is your decision, and it should be a decision rather than a default nobody checked.
- Does Interleaved 2 of 5 have a check digit?
- Not by definition. The symbology allows a modulo 10 check digit, and ITF-14 makes it mandatory, but a bare ITF symbol carries none unless you put one there. Given that the main risk is a short read producing a valid-looking number, adding one is strongly advisable on anything that leaves your own equipment.
- What are the bars above and below the symbol for?
- They are bearer bars, and they exist to make partial scans fail rather than mislead. A beam crossing the symbol diagonally can otherwise enter or exit mid-code and return a shorter number; the frame forces it to cross the whole symbol or nothing. On flexographic printing they also even out the pressure the plate puts on the edges of the printed area.
- Should I use this or ITF-14 for a shipping case?
- ITF-14, without hesitation. It is the same symbology with the length fixed at fourteen, a mandatory check digit and a required frame, and it is what receiving systems expect on a case. Plain ITF on a carton is an invitation for the number to be read short by somebody else's scanner.
- Is it the same as Code 2 of 5?
- No. Standard Code 2 of 5 encodes each digit in the bars alone and leaves the spaces as separators, which makes it roughly twice as wide for the same digits. Interleaved 2 of 5 uses the spaces to carry data as well, which is where its density comes from and also why it requires an even count.