Barcodes are one of the quiet pieces of infrastructure that make modern commerce work. Every product scanned at a checkout, every parcel tracked across a continent, every library book checked out relies on them. If you run a shop, manage inventory, self-publish a book, or ship products, knowing how barcodes work — and how to generate the right type — is genuinely useful.
A barcode is a machine-readable representation of data, encoded as a pattern of parallel lines (1D/linear barcodes) or squares (2D barcodes like QR codes). A scanner reads the pattern of light and dark and decodes it back into the original number or text far faster and more accurately than a human typing it.
The first product ever scanned with a barcode was a pack of Wrigley's chewing gum in Ohio in 1974 — the moment retail changed forever. Today, billions of barcode scans happen every day worldwide.
The most versatile linear barcode. Code 128 can encode all 128 ASCII characters — letters, numbers, and symbols — in a compact form. It's the workhorse for shipping labels, inventory management, warehousing, and any internal tracking system. If you're not selling through retail and just need to encode an SKU or tracking number, Code 128 is almost always the right choice.
An older format that encodes uppercase letters, digits, and a few symbols. Less compact than Code 128 but still widely used in industrial, automotive, and defence applications because of its simplicity and long-standing standardisation. Choose Code 128 over Code 39 for new projects unless a specific system requires Code 39.
The International Article Number — a 13-digit barcode that is the global standard for retail products. If you buy almost anything in a shop anywhere outside North America, it carries an EAN-13. The digits encode a country prefix, a manufacturer code, a product code, and a final check digit. This is the barcode you need to sell products through retailers internationally.
A compressed 8-digit version of EAN for small products where a full EAN-13 won't fit — think chewing gum, cosmetics, or small confectionery. It encodes less information, so EAN-8 numbers are allocated more sparingly by GS1.
The Universal Product Code — a 12-digit barcode developed in the United States and used primarily in the US and Canada. It predates EAN-13 and is, in fact, a subset of it (an EAN-13 with a leading zero is functionally a UPC-A). North American retailers expect UPC-A; international retailers use EAN-13.
The International Standard Book Number, encoded as a 13-digit barcode that always starts with 978 or 979. Every commercially published book has one. The ISBN identifies the title, edition, and publisher, and is what bookshops, libraries, and online retailers use to catalogue and sell books.
This is the most common point of confusion. Both are retail product barcodes, and modern scanners read both interchangeably. The practical differences:
If you sell only in the US and Canada, UPC-A is conventional. If you sell internationally, or anywhere outside North America, use EAN-13.
When a product is scanned at checkout, the barcode number itself contains no price or product name. Instead, the number is a key that looks up the product in the retailer's database, which holds the name, price, stock level, and supplier. This is why a price change never requires reprinting barcodes — only the database entry changes.
This same lookup mechanism powers inventory management: scanning items in and out updates stock counts in real time, triggers reorders, and feeds sales analytics. The barcode is just the fast, error-free way to tell the system which product is involved.
For products sold through real retailers, the underlying number — called a GTIN (Global Trade Item Number) — must be registered with GS1, the international organisation that issues unique product numbers. This guarantees your barcode number is globally unique so it never clashes with another product. GS1 charges a fee based on how many numbers you need.
For internal use — warehouse inventory, asset tracking, event tickets, library systems — you can use any numbering scheme you like without registration. A barcode generator turns your number into a scannable image regardless of whether the number is GS1-registered.
Everything runs in your browser, so your product data never touches a server. For 2D barcodes (URLs, WiFi, contact cards), use our QR Code Generator instead.
Can I print these barcodes on product packaging?
Yes. Download the SVG for the sharpest print quality at any size. For retail sale, make sure the underlying number is GS1-registered so it's globally unique and accepted by retailers.
Why does my EAN-13 get rejected?
EAN-13 requires exactly 13 digits including a valid check digit (the last digit, calculated from the first 12). Enter the complete, correct number as issued by GS1.
7 practical ways to work with PDFs faster. Free, instant download.
Use our free Barcode Generator tool — works in your browser, nothing to install.
Barcode Generator — Free