How to generate a valid internal barcode for items that have none
A scanner cannot tell a factory barcode from one you printed yourself, as long as it is valid and unique. This article shows how to create internal barcodes that never repeat and never collide with imported products.
The short answer: an internal barcode is an EAN-13 number that starts with 2 (the range reserved worldwide for in-store use), followed by a prefix you choose, then an increasing sequence, then a check digit computed by a fixed rule. Generate it by software rather than by hand and it will never repeat, never collide with an imported product, and every scanner and scale will read it like any other barcode.
What needs an internal barcode?
- Produce and bakery goods: no factory, no barcode.
- Local products: a small maker that never registered with the global barcode system.
- Clothing and shoes: the supplier puts one barcode on every colour and size, so you cannot tell them apart.
- In-house packing: rice you weigh yourself, spices you bag, or a bundle of several items.
- Duplicate barcodes: two suppliers using the same number for different products, which happens more often than you think.
Why hand-typed barcodes fail
Most shops start by typing numbers from memory: 1001, 1002, 1003. It works for a month, then the trouble starts: an employee types a number already in use and it is rejected or saved on the wrong item; someone types 13 random digits and the scale refuses them because the check digit is wrong; or an imported product arrives carrying the very number you invented. The result is a cashier scanning one item and seeing another.
The golden rule: barcodes come from one central sequence, not from an employee's head, and follow a fixed shape.
Anatomy of an internal EAN-13
| Part | Example | Role |
|---|---|---|
| First digit | 2 | Declares an in-store barcode, not a globally registered product |
| Prefix | 00 | Distinguishes your label types (shelf, carton, packing) |
| Sequence | 000000042 | Increases automatically; 9 digits cover a billion items |
| Check digit | 7 | Computed from the twelve digits; a scanner rejects the number if it differs |
The check digit is where hand-typed barcodes break: digits are multiplied alternately by 1 and 3, summed, and the amount needed to reach the next ten is the digit. Never compute it yourself; let the system do it.
How to do it in Sahl
- Open Items, then Catalog settings and add a formula: name "Shelf label", type EAN-13, prefix
200. The system shows the first barcode the formula will produce, check digit included. - Open any item, the Barcode aliases tab, press Generate barcode and pick "Shelf label". The row appears ready, its note naming the formula.
- Save the item and print the label from the Print labels screen.
The sequence lives on the server: two employees generating at the same instant get two different numbers, and the generator skips anything you typed by hand earlier. Step by step with screenshots in the internal barcode guide.
When to pick EAN-8 or Code 128
- EAN-8 when the label is too small: jewellery, small perfumes, accessories. Eight digits only, one being the check digit, so prefix and sequence share seven.
- Code 128 when you want letters in the code (
CT-00042for a carton) or free length. Longer on the label, and some scales cannot read it, so keep it for items that never cross the scale. - EAN-13 for everything else. When in doubt, choose it.
Mistakes to avoid from day one
- A prefix that matches your scale: if the scale prints labels starting with
2plus a three-digit item number, give your formula a different prefix (21or29) so the register never mistakes your barcode for a weight label. Read about scale barcodes. - Changing the formula after starting: prefix and type are fixed after the first generation. Want a new shape? Add a new formula.
- Using the number to describe the item: do not try to encode colour or size in the digits. The number is only unique; the description belongs in item attributes and prints on the label next to the barcode.
A valid barcode and a clear label mean a faster register and a more accurate stocktake. If you are organising your barcodes for the first time, start with your hundred best sellers and leave the rest for a quiet day.
Frequently asked questions
Can my internal barcode collide with an imported product?
Not if it starts with 2. That range is reserved worldwide for in-store use and no commercial product is registered in it.
I generated a barcode and did not save the item. Is it lost?
The number is consumed and not reused. The gap changes nothing.
Does the scale read internal barcodes?
Yes for EAN-13 or EAN-8 with a correct check digit, which is what the system generates. Some scales cannot read Code 128.
How many items does a formula hold?
With a three-digit prefix nine digits remain for the sequence: a billion barcodes. You will not run out.