πŸ“Š Universal Barcode Generator πŸ“Š

Generate EAN, UPC, Code 128, Code 39, ITF-14, Codabar, MSI, and more barcode formats

Enter 12 digits for EAN-13
πŸ“‹ Load Sample:

πŸ” Validation & Info

πŸ“Š Barcode Preview

Generate a barcode to see preview

πŸ“š Barcode Formats Explained

πŸ“‹ Overview

This tool supports multiple barcode formats including EAN/UPC (retail), Code 128 (alphanumeric), Code 39, ITF-14, Codabar, MSI, and Pharmacode. Each format has specific use cases and character encoding capabilities.

EAN-13 (European Article Number 13)
  • Length: 13 digits (12 data + 1 check digit)
  • Structure: Country code (2-3 digits) + Manufacturer code (4-5 digits) + Product code (5 digits) + Check digit (1 digit)
  • Usage: Most common format worldwide, used in retail globally
  • Example: 5901234123457
  • Check Digit: Calculated using modulo 10 algorithm
EAN-8 (European Article Number 8)
  • Length: 8 digits (7 data + 1 check digit)
  • Structure: Country code (2-3 digits) + Product code (4-5 digits) + Check digit (1 digit)
  • Usage: Used for small products where EAN-13 doesn't fit
  • Example: 12345670
  • Check Digit: Same algorithm as EAN-13
UPC-A (Universal Product Code A)
  • Length: 12 digits (11 data + 1 check digit)
  • Structure: Number system digit (1) + Manufacturer code (5) + Product code (5) + Check digit (1)
  • Usage: Standard in North America, equivalent to EAN-13 without leading zero
  • Example: 012345678905
  • Note: Adding a leading zero to UPC-A creates a valid EAN-13
UPC-E (Universal Product Code E)
  • Length: 8 digits (7 data + 1 check digit)
  • Structure: Compressed version of UPC-A for small products
  • Usage: Used when space is limited (e.g., small packages, bottles)
  • Example: 01234565
  • Note: Can be expanded to full UPC-A format
Code 128 (Alphanumeric)
  • Type: High-density linear barcode
  • Characters: All 128 ASCII characters (letters, numbers, symbols)
  • Variants: Code 128A (uppercase + control), Code 128B (alphanumeric), Code 128C (numeric pairs)
  • Usage: Shipping labels, packaging, logistics, inventory management
  • Example: HELLO123 or Hello World!
  • Advantages: High density, full ASCII support, automatic check digit
Code 39 (Alphanumeric)
  • Type: Alphanumeric barcode
  • Characters: Uppercase A-Z, digits 0-9, and special chars: space, -.$/+%
  • Usage: Automotive industry, defense, identification cards
  • Example: CODE-39 or ABC123
  • Note: Case-insensitive, limited character set
ITF-14 (Interleaved 2 of 5)
  • Length: 14 digits (13 data + 1 check digit)
  • Type: Numeric barcode with interleaved bars
  • Usage: Shipping cartons, logistics, warehouse management
  • Example: 1234567890123 β†’ 12345678901234
  • Check Digit: Calculated using modulo 10 algorithm
  • Note: Used for outer packaging, not individual products
Codabar (Numeric + Special)
  • Type: Self-checking numeric barcode
  • Characters: Numbers 0-9, start/stop characters: A, B, C, D
  • Usage: Libraries, blood banks, photo labs, shipping
  • Example: A1234567890B or 1234567890
  • Note: Start/stop characters (A-D) are optional but recommended
MSI (Modified Plessey)
  • Type: Numeric barcode
  • Characters: Digits 0-9 only
  • Usage: Retail inventory, warehouse management
  • Example: 123456
  • Note: Variable length, check digit optional
Pharmacode (Pharmaceutical Binary Code)
  • Type: Binary barcode for pharmaceuticals
  • Range: Numeric value from 1 to 131,070
  • Usage: Pharmaceutical packaging, drug identification
  • Example: 12345 or 50000
  • Note: Compact binary format, used on small packages

πŸ“‹ Sample Barcodes

Click the sample buttons above to quickly load and generate example barcodes:

Sample Examples (with calculated check digits):
  • EAN-13 Sample: 590123412345 β†’ 5901234123457 (Poland country code 590)
  • EAN-8 Sample: 1234567 β†’ 12345670
  • UPC-A Sample: 01234567890 β†’ 012345678905
  • UPC-E Sample: 0123456 β†’ 01234565
  • Code 128 Sample: HELLO123 (alphanumeric)
  • Code 39 Sample: CODE-39 (alphanumeric with dash)
  • ITF-14 Sample: 1234567890123 β†’ 12345678901234
  • Codabar Sample: A1234567890B (with start/stop chars)
  • MSI Sample: 123456 (numeric)
  • Pharmacode Sample: 12345 (numeric, 1-131070)

πŸ’‘ Tip: Use the "Load Sample" buttons above to automatically populate and generate these example barcodes. The check digits are automatically calculated for you!

πŸ”’ Check Digit Calculation

The check digit is calculated using a modulo 10 algorithm:

  1. Start from the rightmost digit (excluding check digit)
  2. Multiply digits in odd positions by 1 and even positions by 3
  3. Sum all the results
  4. Find the remainder when divided by 10
  5. If remainder is 0, check digit is 0; otherwise, check digit is 10 - remainder

Example for EAN-13: 590123412345

  • Position 12 (5): 5 Γ— 1 = 5
  • Position 11 (9): 9 Γ— 3 = 27
  • Position 10 (0): 0 Γ— 1 = 0
  • ... (continue for all digits)
  • Sum = 95, 95 mod 10 = 5, Check digit = 10 - 5 = 5
  • Final barcode: 5901234123455

βœ… Validation Rules

  • EAN/UPC formats: Must contain only numeric digits with correct length
  • Code 128: Supports all ASCII characters (letters, numbers, symbols)
  • Code 39: Uppercase letters, numbers, and limited special characters
  • ITF-14: 13 digits (check digit calculated automatically)
  • Codabar: Numbers 0-9, optionally start/end with A, B, C, or D
  • MSI: Numeric digits only, variable length
  • Pharmacode: Numeric value between 1 and 131,070
  • Check digit validation applies to: EAN-13, EAN-8, UPC-A, UPC-E, ITF-14

πŸ’‘ Common Use Cases

  • Retail Products: Product identification in stores
  • Inventory Management: Tracking products in warehouses
  • Point of Sale: Quick product lookup at checkout
  • Supply Chain: Product tracking through distribution
  • Library Systems: Book identification (ISBN uses EAN-13)
  • Pharmaceuticals: Drug identification and tracking

🌍 Country Codes (EAN-13 First Digits)

Common country codes in EAN-13:

  • 00-09: United States & Canada (UPC compatible)
  • 20-29: In-store products
  • 30-37: France
  • 40-44: Germany
  • 45, 49: Japan
  • 50: United Kingdom
  • 54: Belgium & Luxembourg
  • 57: Denmark
  • 64: Finland
  • 70: Norway
  • 73: Sweden
  • 76: Switzerland
  • 80-83: Italy
  • 84: Spain
  • 87: Netherlands
  • 90-91: Austria
  • 93: Australia
  • 94: New Zealand
  • 460-469: Russia
  • 690-699: China
  • 750: Mexico
  • 789-790: Brazil

Support This Free Tool

Every coffee helps keep the servers running. Every book sale funds the next tool I'm dreaming up. You're not just supporting a site β€” you're helping me build what developers actually need.

500K+ users
200+ tools
100% private
Privacy Guarantee: Private keys you enter or generate are never stored on our servers. All tools are served over HTTPS.