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.
UPC, EAN-13 and Code 128
| Type | Content | Number from | Used for |
|---|---|---|---|
| UPC-A | 12 digits | GS1 | Retail, US/Canada |
| EAN-13 | 13 digits | GS1 | Retail elsewhere |
| EAN-8 | 8 digits | GS1 | Small packs |
| Code 128 | Any text | Anyone | Stock 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
12345678is 32.7 mm wide including its quiet zones, whileBIN-A12-0045is 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:
| X | Size | Minimum bar height |
|---|---|---|
| 0.264 mm | minimum (80%) | 18.28 mm |
| 0.330 mm | target (100%) | 22.85 mm |
| 0.660 mm | maximum (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:
- Add the digits in odd positions (1st, 3rd, 5th, 7th, 9th, 11th): 9 + 2 + 6 + 4 + 2 + 0 = 23.
- Add the digits in even positions (2nd to 12th) and multiply by 3: (5 + 7 + 5 + 3 + 1 + 1) × 3 = 66.
- Add the two: 23 + 66 = 89.
- 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
- Open the Barcode Generator and pick the Barcode type: UPC-A or EAN-13 for retail products, Code 128 for stock labels.
- 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.
- 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.
- 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.