Understanding barcode format requirements is essential when using a barcode generator or QR code generator. Each barcode type has specific rules about what data it can encode, how many characters it supports, and what format the input must follow. This reference guide covers every barcode format available in our free barcode generator and bulk barcode generator.

Linear (1D) Alphanumeric Barcodes

These barcode formats support letters and numbers, making them versatile for logistics, shipping, and asset tracking applications.

1D Alphanumeric

Code 128

Character Set Full ASCII (128 characters)
Length Variable (optimal <30 chars)

Supports the full ASCII character set including numbers, uppercase/lowercase letters, and special control codes.

Valid Example: Item-98765-Prod

Best Used For: General logistics, shipping labels, and asset tracking. The most versatile and commonly used 1D barcode format.

1D Alphanumeric

Code 39

Character Set A-Z, 0-9, -, ., $, /, +, %, space
Length Variable (wider than Code 128)

Alphanumeric barcode supporting uppercase letters (A-Z), digits (0-9), and select symbols. Start/stop characters (*) are automatically added by generators — do not include them in your input.

Valid Example: ASSET-442-B

Best Used For: Automotive, defense, and industrial applications.

Retail & Product Barcodes (Numeric Only)

These barcodes are used on retail products worldwide. They only accept numeric digits and have strict length requirements.

Retail

EAN-13

Character Set Numeric only (0-9)
Length Exactly 13 digits

Requires exactly 13 digits — 12 data digits plus 1 calculated checksum digit. Many barcode generators accept 12 digits and auto-calculate the 13th.

Valid Example: 9780201379624

Best Used For: International retail products (outside North America) and books (ISBN).

Retail

EAN-8

Character Set Numeric only (0-9)
Length Exactly 8 digits

Requires exactly 8 digits — 7 data digits plus 1 calculated checksum digit. A compact version of EAN-13.

Valid Example: 73513537

Best Used For: Small retail items where a full-sized EAN-13 barcode would take up too much packaging space.

Retail

UPC-A

Character Set Numeric only (0-9)
Length Exactly 12 digits

Requires exactly 12 digits — 11 data digits plus 1 calculated checksum digit. The standard barcode format for North American retail.

Valid Example: 012345678905

Best Used For: Standard retail items in North America.

Special-Purpose 1D Barcodes

These barcode formats serve specific industry needs — from shipping to pharmaceutical packaging.

Special Purpose

ITF-14 (Interleaved 2 of 5)

Character Set Numeric only (0-9)
Length Exactly 14 digits

Requires exactly 14 digits — 13 data digits plus 1 calculated checksum digit. Standard Interleaved 2 of 5 encodes digits in pairs, meaning the input string length must always be an even number.

Valid Example: 10012345678902

Best Used For: Outer shipping cases, corrugated cardboard boxes, and master cartons.

Special Purpose

MSI (MSI Plessey)

Character Set Numeric only (0-9)
Length Variable

Numeric-only barcode with variable length. Often requires configuring a checksum digit (Modulo 10, Modulo 11, or double Modulo 10) to match your scanning hardware specifications.

Valid Example: 1234567

Best Used For: Retail inventory shelf labeling and warehouse management.

Special Purpose

Pharmacode

Character Set Numeric only (0-9)
Length Integer: 3 to 131,070

Can only represent a single whole integer in the range of 3 to 131,070. Does not support strings starting with 0. This is a specialized barcode format unique to the pharmaceutical industry.

Valid Example: 84291

Best Used For: Pharmaceutical packaging control systems to prevent packaging mix-ups.

2D Matrix Barcodes

Two-dimensional barcodes store significantly more data than 1D barcodes and can be scanned from any angle. Use our free QR code generator to create custom QR codes.

2D Matrix

QR Code

Character Set Numeric, alphanumeric, binary, Kanji
Max Capacity 7,089 numeric / 4,296 alphanumeric

The most flexible barcode format. QR codes support numeric, alphanumeric, byte/binary, and Kanji data. Capable of holding up to 7,089 numeric characters or 4,296 alphanumeric characters. The QR code density adjusts dynamically depending on the payload size.

Valid Example: https://www.example.com/item/id-987

Best Used For: Mobile interactions, URLs, digital payments, vCards, and complex product tracking. Create custom QR codes with our custom QR code generator.

Ready to create your barcodes?

Quick Comparison Table

Format Type Characters Length Use Case
Code 1281DFull ASCIIVariableLogistics, Shipping
Code 391DA-Z, 0-9, SymbolsVariableAutomotive, Defense
EAN-131DNumeric13 digitsInternational Retail
EAN-81DNumeric8 digitsSmall Products
UPC-A1DNumeric12 digitsUS/Canada Retail
ITF-141DNumeric14 digitsShipping Cartons
MSI1DNumericVariableInventory Shelves
Pharmacode1DNumeric3–131,070Pharmaceutical
QR Code2DAnyUp to 7,089URLs, Payments, vCards

Tips for Using Barcode Formats

  1. Check your input: Most barcode generation errors come from entering invalid characters or the wrong number of digits.
  2. Let the generator calculate checksums: For EAN, UPC, and ITF formats, most generators (including ours) auto-calculate the check digit.
  3. Use Code 128 when in doubt: It's the most versatile 1D format and supports the widest character set.
  4. Choose QR for mobile: If your barcode will be scanned by smartphones, QR codes are the best choice for readability and data capacity.
  5. Use our batch barcode generator to create multiple barcodes at once from CSV or text input.