Last updated: May 2026
Generate Code 128, EAN-13, UPC-A, EAN-8, Code 39, and ITF barcodes. Customize size and colors, then download as PNG — free, no sign-up required.
Barcode Format
Customization
Code 128 is the most versatile linear barcode format. It encodes the full ASCII character set at high density. Used in logistics, shipping labels, healthcare, and any application that needs variable-length alphanumeric data. It is the best default choice when no specific format is required.
EAN-13 and UPC-A are the standard retail product barcodes. EAN-13 (13 digits) is used internationally. UPC-A (12 digits) is the US and Canada standard. Both encode a manufacturer code and product code. These are the barcodes on most consumer goods. Generating one for a product you intend to sell commercially requires purchasing a GS1 company prefix.
Code 39 encodes uppercase letters, digits, and a handful of symbols. Widely used in military, automotive, and industrial contexts. Less compact than Code 128 but simpler and universally supported.
ITF-14 (Interleaved 2 of 5) is used on outer cases and cartons in retail supply chains. It always encodes 14 digits. The bold border (bearer bars) prevents false reads at edges.
| Format | Characters | Length | Common Use |
|---|---|---|---|
| Code 128 | Full ASCII | Variable | Logistics, shipping, general |
| EAN-13 | Digits only | 13 exactly | Retail products worldwide |
| UPC-A | Digits only | 12 exactly | US/Canada retail |
| EAN-8 | Digits only | 8 exactly | Small product packaging |
| Code 39 | A-Z, 0-9, symbols | Variable | Industrial, military |
| ITF-14 | Digits only | 14 exactly | Shipping cartons |
Preview
Enter content on the left
to generate your barcode
Generated in your browser — nothing sent to our servers.
Related Tool
A barcode is a machine-readable representation of data, typically displayed as a series of parallel lines (1D) or a grid of squares (2D). The scanner reads reflected light patterns to decode the encoded information — usually a product identifier, serial number, or URL. Barcodes were first used commercially in 1974 when a pack of Wrigley's gum was scanned at a Marsh supermarket in Troy, Ohio, marking the dawn of modern retail automation.
Choosing the right barcode format depends entirely on what you need to encode and where the barcode will be read. Retail products destined for store shelves require EAN-13 or UPC-A because point-of-sale scanners are configured for those standards. Internal logistics and shipping labels commonly use Code 128 because it encodes the full ASCII character set with high data density. Two-dimensional formats like QR Code and Data Matrix can hold orders of magnitude more data and can be read by any smartphone camera, making them the go-to choice for marketing, ticketing, and supply-chain traceability.
| Format | Data Type | Max Characters | Common Use |
|---|---|---|---|
| Code 128 | Full ASCII (128 chars) | ~48 chars practical | Shipping labels, logistics |
| Code 39 | Uppercase alpha + digits | ~20 chars practical | Industrial, healthcare ID |
| EAN-13 | Numeric only | 13 digits (fixed) | Retail products worldwide |
| UPC-A | Numeric only | 12 digits (fixed) | Retail products (North America) |
| QR Code | Binary / UTF-8 | 4,296 alphanumeric | URLs, marketing, payments |
| Data Matrix | Binary / ASCII | 2,335 alphanumeric | Electronics, pharmaceuticals |
| PDF417 | Binary / text | 1,850 text chars | Boarding passes, ID cards |
What is a barcode and how does it work?
A barcode encodes data in a visual pattern — either parallel lines (1D) or a grid (2D) — that a scanner decodes by measuring reflected light. The scanner converts the light/dark pattern into binary data and looks up the corresponding value. 1D barcodes like Code 128 store data horizontally; 2D barcodes like QR codes store data in both dimensions, allowing far more information in the same physical space.
What is the difference between 1D and 2D barcodes?
One-dimensional (1D) barcodes store data in a single row of varying-width lines and spaces, readable only by a horizontal scan. They typically hold 20–50 characters. Two-dimensional (2D) barcodes like QR Code and Data Matrix encode data in a matrix of cells that can be read from any angle, storing thousands of characters. 2D barcodes also include error-correction data, so they remain readable even when partially damaged.
Do I need to pay to use a barcode for my products?
For retail barcodes (EAN-13, UPC-A), GS1 — the global standards body — requires a paid license to obtain an official company prefix, which costs $250–$10,500/year depending on the number of products. This ensures your barcode numbers are globally unique and won't conflict with another manufacturer's products. For internal-use barcodes (shipping labels, asset tracking, inventory), you can generate and use barcodes free of charge since they never enter the global retail system.
What is the difference between EAN and UPC barcodes?
UPC-A (Universal Product Code) is a 12-digit barcode standard used primarily in the United States and Canada. EAN-13 (European Article Number) is a 13-digit superset of UPC-A used globally — a UPC-A barcode is actually an EAN-13 with a leading zero prepended. Most modern POS systems worldwide accept both formats interchangeably. If you're selling outside North America, EAN-13 is the correct choice.
How do I scan a barcode with a smartphone?
On iPhone (iOS 11+), open the Camera app and point it at the barcode — a notification appears automatically without any additional app. On Android, Google Lens (built into the Camera app on most devices) decodes barcodes on tap. For QR codes specifically, both platforms decode them natively through the Camera app. For 1D barcodes like Code 128 or EAN-13, some Android devices require a dedicated scanning app like Barcode Scanner or Google Lens if the native camera doesn't respond.