Barcode Generator

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

Bar Color
Background Color
Width (bar width multiplier): 2
Height: 80px

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.

FormatCharactersLengthCommon Use
Code 128Full ASCIIVariableLogistics, shipping, general
EAN-13Digits only13 exactlyRetail products worldwide
UPC-ADigits only12 exactlyUS/Canada retail
EAN-8Digits only8 exactlySmall product packaging
Code 39A-Z, 0-9, symbolsVariableIndustrial, military
ITF-14Digits only14 exactlyShipping cartons

Preview

Enter content on the left
to generate your barcode

Generated in your browser — nothing sent to our servers.

Related Tool

QR Code Generator
URL, WiFi, vCard, Email, Phone

Understanding Barcodes: Formats, Uses, and How They Work

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.

FormatData TypeMax CharactersCommon Use
Code 128Full ASCII (128 chars)~48 chars practicalShipping labels, logistics
Code 39Uppercase alpha + digits~20 chars practicalIndustrial, healthcare ID
EAN-13Numeric only13 digits (fixed)Retail products worldwide
UPC-ANumeric only12 digits (fixed)Retail products (North America)
QR CodeBinary / UTF-84,296 alphanumericURLs, marketing, payments
Data MatrixBinary / ASCII2,335 alphanumericElectronics, pharmaceuticals
PDF417Binary / text1,850 text charsBoarding passes, ID cards

Worked Examples

Example 1 — Encoding a product SKU with Code 128
A warehouse needs to label boxes with the SKU "WH-2024-BOLT-10MM". Code 128 is selected because it supports hyphens and mixed case. The resulting barcode encodes all 18 characters including dashes, and a standard laser scanner reads it from up to 30 inches away. The barcode width expands proportionally — roughly 1 inch of barcode width per 10 characters at a standard X-dimension of 0.010 inches.
Example 2 — Generating an EAN-13 for a retail product
A small manufacturer wants to sell a product in European supermarkets. They register with GS1 to obtain a company prefix (e.g., 501 for the UK), then assign a 5-digit item reference. The 13th digit is a check digit calculated using the Luhn-style modulo-10 algorithm. For example, digits 5-012345-67890 yield a check digit of 4, producing the final barcode: 5012345678904. The barcode must be printed at a minimum height of 69 mm and width of 37.29 mm to comply with GS1 standards.

Frequently Asked Questions

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.

Downloaded