Barcodes for small sellers: official numbers, stock labels and print size

Anyone can draw a barcode in seconds. Whether a store accepts it depends on the number inside, and whether it scans depends on how it is printed. This guide covers both.

Updated

UPC, EAN-13 and Code 128

TypeContentNumber fromUsed for
UPC-A12 digitsGS1Retail, US/Canada
EAN-1313 digitsGS1Retail elsewhere
EAN-88 digitsGS1Small packs
Code 128Any textAnyoneStock labels

UPC-A and EAN-13 carry the same kind of number, a GTIN, at different lengths: a 12-digit GTIN in a UPC-A is the same number as a 13-digit GTIN with a leading 0. Both end in a check digit. Code 128 isn't tied to any numbering system, so it suits codes you invent, but no store checkout will recognize it as a product code.

Why a retail number must come from GS1

Checkouts look up price and description by the number in the barcode, and that number is only unique worldwide because one body hands numbers out: GS1. According to GS1, a company that needs barcodes contacts the GS1 Member Organisation in its country, gets a GS1 Company Prefix, and then numbers each of its products from that prefix. In the US that is GS1 US, which licenses either a single GTIN or a Company Prefix sized for 10, 100, 1,000 or more items. Where a country has no GS1 office, any Member Organisation can issue one. The first digits show which GS1 office issued the number, not where the product was made.

A made-up number can clash with a product that is already registered, and retailers can check: the Verified by GS1 service shows the company that owns a GTIN. Use the same service on any number a cheap barcode reseller offers you. If the company shown isn't yours, the number isn't yours either.

Fees are set by each GS1 office and change, so check your local GS1 site. List your products before you buy: every variant sold separately, such as a 250 g and a 500 g bag or a different flavor, needs its own number.

Internal stock labels with Code 128

For shelves, bins or items without a factory barcode, use Code 128 with your own SKU codes. There is nothing to register, and almost every scanner reads it. Two choices make the labels easier to use:

  • Digits only, an even count. Code 128 packs two digits into one character. At X = 0.33 mm, the code 12345678 is 32.7 mm wide including its quiet zones, while BIN-A12-0045 is 58.1 mm. Only the first fits on a 2-inch (50 mm) label.
  • A fixed length. Codes of equal length are easier to check in a spreadsheet.

Print size and quiet zones

A barcode's size is set by X, the width of its narrowest bar. GS1 General Specifications release 26.0 (January 2026) gives these figures for EAN-13 and UPC-A scanned at a retail checkout:

XSizeMinimum bar height
0.264 mmminimum (80%)18.28 mm
0.330 mmtarget (100%)22.85 mm
0.660 mmmaximum (200%)45.70 mm

An EAN-13 needs a blank quiet zone of 11X on the left and 7X on the right; UPC-A needs 9X on both sides, EAN-8 7X and GS1-128 10X. A quiet zone trimmed to fit a label, or crossed by a design line on the pack, often stops a correctly sized barcode from scanning.

Thermal label printers

A 203 dpi thermal printer prints dots 0.125 mm wide, so a 0.33 mm bar can't be printed exactly. GS1 notes that the closest a 200 or 300 dpi printer gets to 80% is 75.7 or 76.9%, and allows 75 to 80% only for such on-demand printers, with wider quiet zones and taller bars. The safer choice is an X of exactly 3 dots, 0.375 mm. On a 300 dpi printer, the tool rounds an X of 0.33 mm to 4 pixels at a PNG resolution of 300 DPI, or 0.339 mm, which lines up with the printer's dots.

Checking a check digit by hand

The last digit of an EAN-13 is computed from the 12 before it. Using the GS1 example number 952765432101:

  1. Add the digits in odd positions (1st, 3rd, 5th, 7th, 9th, 11th): 9 + 2 + 6 + 4 + 2 + 0 = 23.
  2. Add the digits in even positions (2nd to 12th) and multiply by 3: (5 + 7 + 5 + 3 + 1 + 1) × 3 = 66.
  3. Add the two: 23 + 66 = 89.
  4. The check digit is what takes you to the next multiple of 10: 90 − 89 = 1. The full number is 9527654321011.

To check a finished 13-digit number, include the 13th digit with weight 1: the total must be a multiple of 10. Mistype the 12th digit as 7 and the total becomes 108, so the scanner rejects the read. For a UPC-A, the weight of 3 falls on the odd positions instead, because the number is one digit shorter.

Making a barcode on swift.id

  1. Open the Barcode Generator and pick the Barcode type: UPC-A or EAN-13 for retail products, Code 128 for stock labels.
  2. Type the number into Number or text. For EAN-13, 12 digits are enough; the check digit is added for you. The sample number starts with 952, a prefix GS1 keeps for examples, so never print it on a product. If you type 13 digits with a wrong check digit, the tool shows the right one and a button to use it.
  3. Set the Module width (X) and Bar height in millimeters. The tool warns when an EAN-13 or UPC-A X falls outside 0.264 to 0.66 mm or the bars are shorter than the GS1 minimum.
  4. Choose the PNG resolution that matches your printer, then press Download PNG, or Download SVG for packaging artwork. Print at 100% scale and scan the first sheet before printing more.

A QR code on the pack suits a link to instructions or a chat with you (see the WhatsApp link guide); make one with the QR Code Generator. GS1 aims for checkouts worldwide to read 2D barcodes by the end of 2027, but while your retailers scan UPC or EAN-13, a QR code doesn't replace them.

Questions

Can I make up my own UPC or EAN-13 number?
Not for goods sold through retailers. The number has to come from GS1 so it can't clash with another product. For use in your own warehouse or shop, use Code 128 with your own SKU codes.
How much does a GS1 barcode cost?
Each GS1 office sets its own fees, and they change, so this guide doesn't list them. Check the current price list on your local GS1 site before you buy.
Are cheap barcodes from online resellers safe to use?
Check the number in Verified by GS1 first, which shows the company that owns a GTIN. If the name shown isn't your company, any retailer that checks will see the same thing.
Why won't my barcode scan at the checkout?
Usually because it was printed smaller than an X of 0.264 mm, stretched in one direction, had its quiet zones trimmed, or printed in a light color. Print at 100% scale, don't choose "fit to page", and keep the space on both sides of the barcode blank.