Barcode Formats Quick Reference
A cheat sheet detailing the input validation rules, character sets, lengths, and example formats for every barcode type in our free barcode generator.
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.
Code 128
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.
Code 39
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.
EAN-13
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).
EAN-8
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.
UPC-A
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.
ITF-14 (Interleaved 2 of 5)
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.
MSI (MSI Plessey)
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.
Pharmacode
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.
QR Code
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 128 | 1D | Full ASCII | Variable | Logistics, Shipping |
| Code 39 | 1D | A-Z, 0-9, Symbols | Variable | Automotive, Defense |
| EAN-13 | 1D | Numeric | 13 digits | International Retail |
| EAN-8 | 1D | Numeric | 8 digits | Small Products |
| UPC-A | 1D | Numeric | 12 digits | US/Canada Retail |
| ITF-14 | 1D | Numeric | 14 digits | Shipping Cartons |
| MSI | 1D | Numeric | Variable | Inventory Shelves |
| Pharmacode | 1D | Numeric | 3–131,070 | Pharmaceutical |
| QR Code | 2D | Any | Up to 7,089 | URLs, Payments, vCards |
Tips for Using Barcode Formats
- Check your input: Most barcode generation errors come from entering invalid characters or the wrong number of digits.
- Let the generator calculate checksums: For EAN, UPC, and ITF formats, most generators (including ours) auto-calculate the check digit.
- Use Code 128 when in doubt: It's the most versatile 1D format and supports the widest character set.
- Choose QR for mobile: If your barcode will be scanned by smartphones, QR codes are the best choice for readability and data capacity.
- Use our batch barcode generator to create multiple barcodes at once from CSV or text input.