Barcode basics

Barcodes for product variants: one number per size, colour and pack

Barcodes for product variants made simple: give each size, colour and pack its own number, and build a matrix so the till always rings up the right one.

Title card: Barcodes for product variants: one number per size, colour and pack — PurchaseBarcode

Every version of a product that a customer can pick up and pay for needs its own barcode number. Make a grid of your sizes, colours and packs, count the cells, and give each cell one number.

Why barcodes for product variants come one per thing

A barcode number tells the till one thing: which item just crossed the scanner. It does not know about sizes or colours. It only knows the number. So if your black T-shirt in medium and your black T-shirt in large share a number, the till sees them as the same item. Your stock count drifts, and your sales report is wrong.

The rule for barcodes for product variants is simple. Each thing a customer can pick up and pay for gets one number. If two items differ in a way a buyer cares about, and they sit on the shelf as separate choices, they get separate numbers.

That covers size, colour, flavour, weight and pack count. It does not cover changes a buyer never chooses, such as a new print run of the same label.

Build the variant matrix

Before you buy a single number, draw a grid. Use a spreadsheet, or a sheet of paper if the range is small.

Put one option down the side and the other across the top. For a cotton T-shirt in three colours and five sizes, colours go down the side and sizes go across. Each cell is one sellable thing.

| | S | M | L | XL | XXL | |---|---|---|---|---|---| | Black | ✓ | ✓ | ✓ | ✓ | ✓ | | White | ✓ | ✓ | ✓ | ✓ | ✓ | | Navy | ✓ | ✓ | ✓ | ✓ | ✓ |

That grid has 15 cells, so the shirt needs 15 numbers.

If there is a third option, such as sleeve length, make one grid for each. Two sleeve lengths means two grids of 15, so 30 numbers.

Now cross out the cells you will not stock. If navy only comes in M and L, three navy cells go. Only number what you will really sell. A blank cell costs nothing. A number you buy and never use is money spent.

Count what you need

Add up the live cells. Then add a small buffer for next season. A useful rule is one extra number for every five you need today, so 15 becomes 18. That covers a new colour or a size you forgot.

Do the count for every product, not only clothing. A spice brand with turmeric in 100 g, 200 g and 500 g pouches needs three numbers for turmeric alone. Add chilli and coriander in the same three weights, and the range needs nine.

Once you know the total, buy the right block in one go. Our home page shows the pack sizes, so you can pick the one that covers your count with a little room left over.

Use code STARTUP10 for 10% off one order per account. It is valid until 31 December 2026 or for the first 100 uses on this site, whichever comes first.

Packs and bundles get their own number

A pack of three socks is not three socks at the till. It is one item with one price. So it needs its own number, separate from the single pair.

The same goes for a gift box, a combo of two flavours, or a family pack. If a shopper can buy it as one thing, it is one cell in your matrix.

Put the pack's number on the outer wrap. Then cover the single-item barcodes inside, or turn them to face inward. If the till can see two barcodes, the cashier may scan the wrong one and charge for a single pair.

Cartons for the back room

Cartons that go to a shop's stockroom are a different case. A carton of 24 bottles is not usually sold to a shopper at the till. But many shops count cartons when they take in stock, and they like a number on the box for that.

If a buyer asks for carton numbers, give each carton size its own number. A carton of 12 and a carton of 24 of the same bottle are two numbers. Print them large, on two sides of the box, so a person with a handheld scanner can reach one without moving the stack.

Give each number a clear name

A number with no name is easy to mix up. In your spreadsheet, put a short text code next to each number. Keep it in plain letters so nobody confuses it with the barcode itself.

A good pattern is product, colour, size. The black medium T-shirt becomes TEE-BLK-M, and the white extra large becomes TEE-WHT-XL. The turmeric 200 g pouch becomes TUR-200G.

Add three more columns: the full product name, the MRP, and the date you gave out the number. When you add a new variant later, you will see at a glance which numbers are free.

Never reuse a number for a different item, even after you stop selling the first one. Old stock and old records may still carry it. Give the new item a fresh number from your buffer.

Print labels in batches, one variant at a time. Finish all the black medium labels, stick them on the black medium shirts, then move on. Mixing batches is the most common way a wrong label ends up on a shelf.

For swing tags and small pouches, a label of 38 mm by 25 mm is enough for the barcode, the variant name and the MRP. Leave clear white space on both sides of the bars. A direct thermal printer works for labels that only need to last a few months. For goods that sit in heat or sunlight, use a thermal transfer printer with a wax-resin ribbon so the bars do not fade.

Print the variant name in plain words under the barcode, such as "Black, M". Staff can then check by eye before they scan.

Check every variant at the till

Before stock goes out, scan one item from each cell of your matrix. Watch the screen. The till should show the right name, size and MRP every time.

If two variants show the same item, you have a repeated number. Stop and fix the label before the stock leaves. If an item does not scan at all, look at the print. Faded bars, a crease through the code or a label wrapped round a tight curve are the usual causes.

If you list the same variants in an online store as well, use the same number for each variant there as on the shelf. One sellable thing, one number, wherever it is sold. If you are not sure how a particular store sets up variants, tell us where you sell and we will help you match it.

When every cell scans to the right item, your matrix is done. Keep the spreadsheet with your stock records, and add a row each time a new size, colour or pack joins the range.

Good to know before you buy

These are correctly formed, scannable numbers issued to you alone. A standard retail or POS scanner reads them: it checks the number's structure and its check digit, nothing more. Whether a marketplace or retailer accepts one is that channel's own decision — a small share of platforms and retailers look every number up in the global barcode database and will ask for a registered code instead. Tell us where you plan to sell and we will check it with you before you buy. Which barcode do I need?

Buy barcodes Which barcode do I need?