Cartix Prime

EAN-13 vs Code 128: the types of barcode a shop actually meets

For shop owners who see several barcode options in label software and wonder which to pick. EAN-13 vs Code 128 is the choice most shops face: one is the retail number on every packet, the other is a flexible code for your own item codes. This guide explains both, plus UPC-A, EAN-8 and QR, with a worked check digit example.

Updated 1 November 2026

EAN-13 vs Code 128: the short answer

EAN-13 is a 13-digit, numbers-only barcode used on retail products all over the world, including almost every packet in an Indian shop. Code 128 is a flexible barcode that can hold letters, numbers and symbols of any length, used for internal codes, cartons and logistics.

In a shop: use EAN-13 for anything a customer buys, including your own in-store codes. Use Code 128 only when your item code has letters or a length that is not a valid retail number.

The barcode types side by side

TypeHoldsWhere you see itUse it in a shop for
EAN-13Exactly 13 digits; the last is a check digitPackets, bottles, books; Indian brands start with 890Selling items, in-store codes starting with 2, scale labels
UPC-AExactly 12 digitsGoods made for the US and Canada; some importsScanning imports; not for making your own codes
EAN-8Exactly 8 digitsVery small packs: lip balm, small sachets, small tubesScanning only; real EAN-8 numbers are issued by GS1 for space-constrained packs
Code 128Letters, numbers, symbols, any lengthCourier labels, cartons, internal item codes, invoice numbersItem codes like SH-42-BLK; bill numbers printed as barcodes
QR codeText, links, payment details, a lot of dataUPI payment, websites, menus, e-invoicesPayment and links, not item billing at most counters

You may also meet Code 39 (an older letters-and-numbers code, wide and less dense than Code 128) and DataMatrix (a small square 2D code, common on medicines and electronics parts). A 2D scanner reads both. More on scanners is in the guide to choosing a barcode scanner.

EAN-13 in detail

An EAN-13 number has three parts:

  • Prefix and company number: the first digits. Numbers starting with 890 are issued by GS1 India to brand owners. Numbers starting with 20 to 29 are kept by GS1 for in-store use, so a shop can make its own without clashing with any brand.
  • Item reference: the brand's own number for that exact product and pack size.
  • Check digit: the 13th digit, worked out from the first 12.

EAN-13 is short and dense, so it fits on a 38x25 mm label, and every retail scanner in the world reads it. Its limit is that it holds only digits and always exactly 13 of them. That is fine for a product number, and it is why scale labels also use EAN-13: the digits carry the item and the weight or price. That layout is in the guide to weighing scale barcodes.

How the EAN-13 check digit works: a worked example

The check digit lets the scanner catch a misread. If one bar is smudged and a 3 reads as an 8, the check fails and the scanner stays silent instead of billing the wrong item. Here is the calculation for the example number 890246813579 (12 digits; we will find the 13th).

  1. Write the 12 digits in positions 1 to 12. 8 9 0 2 4 6 8 1 3 5 7 9.
  2. Add the digits in odd positions (1st, 3rd, 5th, 7th, 9th, 11th): 8 + 0 + 4 + 8 + 3 + 7 = 30.
  3. Add the digits in even positions (2nd, 4th, 6th, 8th, 10th, 12th): 9 + 2 + 6 + 1 + 5 + 9 = 32.
  4. Multiply the even total by 3: 32 × 3 = 96.
  5. Add the two: 30 + 96 = 126.
  6. Find what takes it to the next multiple of 10: 130 − 126 = 4. If the total already ends in 0, the check digit is 0.

So the full barcode is 8902468135794. To check a number in seconds, use the free EAN-13 check digit calculator.

Try changing one digit: 890246813578 (last 9 changed to 8) gives a total of 123 and a check digit of 7. One small change, a different check digit. That is how a single misread gets caught.

A common shop problem: someone types 13 random digits as an in-store code. Nine times out of ten the last digit is wrong, and the software or scanner rejects it. Always calculate it.

UPC-A and EAN-8

UPC-A is the 12-digit cousin of EAN-13, used in the US and Canada. A UPC-A number is the same as an EAN-13 with a 0 in front: UPC 012345678905 is EAN 0012345678905. Many scanners can send it either way. The only shop rule: save it in your item list the same way your scanner sends it, or the item will not be found.

EAN-8 is for packs too small for EAN-13. GS1 India allocates these (it calls them GS1-8) for products with space constraints. A shop should not make up EAN-8 numbers; use EAN-13 with a smaller label instead.

Code 128 in detail

Code 128 can hold capital and small letters, digits and symbols, and any length. It has its own hidden check character, so scanners catch misreads with it too. Long runs of digits pack tightly, so a 10-digit number in Code 128 is narrower than you might expect.

Use it when:

  • Your item codes have letters, like a saree shop's design code KS-0412-RED.
  • Your code is not 8, 12 or 13 digits, like a five-digit item number 10457.
  • You want a document number as a barcode, such as a bill number printed on a bill for quick returns.

Two cautions. First, Code 128 gets wider as the code gets longer, so a 15-character code may not fit a 38 mm label; keep codes short. Second, Code 128 is not a retail product number. If you supply goods to other shops, they expect an EAN-13 from GS1, not a Code 128 label. See how to create a barcode for products for which number to use when.

You may also see GS1-128 on cartons from big suppliers. It is Code 128 with GS1 data inside, such as a batch, an expiry date or a carton number, marked with numbers in brackets like (10) or (17). Your counter does not need to bill from it.

QR codes: useful, but not for item billing

QR codes hold far more than a barcode: a web link, a UPI payment request, an e-invoice's signed data. A 2D scanner or a phone camera reads them. In shops they suit payment QR on the counter or bill, links to your WhatsApp or online shop, and menus. For the item on the shelf, an EAN-13 stays faster to print, cheaper to scan and works with every scanner, including old 1D ones.

Which barcode type to use, by situation

SituationUse
Packet already has a barcodeNothing to print; save the maker's code to the item
Unbarcoded item sold only in your shopEAN-13 in-store code starting with 2
Weighed pack of rice or sweetsEAN-13 scale barcode (prefix 20 to 29, often 21 or 22)
Garment with a design code containing lettersCode 128 of the design code, or give it an in-store EAN-13
Your own brand sold in other shops or onlineEAN-13 from GS1 India
Payment or a linkQR code

If in doubt, in-store EAN-13 is the safer choice for anything sold at the counter: every scanner reads it and it fits small labels. Preview any type with the free barcode generator.

How Cartix Prime picks the type

Cartix Prime prints EAN-13, UPC-A or EAN-8 when the number is a valid retail code, and Code 128 for anything else, so a design code with letters still prints and scans. Items with no barcode can get an in-store EAN-13 on every plan, checked to be unused in your shop. Labels show barcodes only: Cartix Prime does not print QR codes on labels. The bill number can be printed on the bill as a barcode, and a UPI QR for amounts due is a bill design option. Label printing is on Silver and up; see the barcode label printing page, or if your counter is full of items that will not scan, read fixing items without barcodes.

Questions

What is the difference between EAN-13 and Code 128?
EAN-13 holds exactly 13 digits and is the retail product barcode used on packets worldwide. Code 128 holds letters, numbers and symbols of any length and is used for internal codes, cartons and documents. Shops use EAN-13 for products and Code 128 for codes with letters.
Which barcode type is used in retail shops in India?
EAN-13. Almost every packaged product in India carries a 13-digit EAN-13, and Indian brands' numbers start with 890. Shops can make their own in-store EAN-13 codes starting with 2 for items without a barcode.
How is the EAN-13 check digit calculated?
Add the digits in odd positions, add the digits in even positions and multiply that sum by 3, then add both totals. The check digit is what brings the result up to the next multiple of 10. For 890246813579, the total is 126, so the check digit is 4.
Is UPC the same as EAN?
Nearly. UPC-A has 12 digits and is used mainly in the US and Canada. Put a 0 in front and it becomes a valid EAN-13. Most scanners read both; just save the code in your billing software the way your scanner sends it.
Can I use a QR code instead of a barcode for billing?
Some systems can, but most shop counters and older scanners bill from EAN-13 barcodes. QR codes are better for payments, links and menus. For items on the shelf, print a normal barcode.
What are the main types of barcode?
The ones shops meet are EAN-13, UPC-A and EAN-8 for retail products, Code 128 and Code 39 for internal and logistics codes, and 2D codes such as QR and DataMatrix for payments, links and medicines.

Try it at your counter tonight.

2 days with everything, free. Bring your items from Excel, connect the printer and scanner you already have, and start billing the same day.

Cartix Prime Offline is ₹8,999 once, with the first year of updates. Online plans from ₹599 a year. See prices