📊 Code 39 Barcode Generator

Generate Code 39 barcodes with optional checksum and extended character set support

Enter text to encode (A-Z, 0-9, and special characters: - . * $ / + % space)
Add a calculated checksum digit for enhanced error detection
Enable full ASCII character support (lowercase letters, symbols)
Adjust the width of individual bars (1-5 pixels)
2
Height of the barcode bars in pixels
Display the encoded text below the barcode for readability

Your Result:

📊 CODE 39

HELLO123 → Barcode Preview

Industrial standard barcode with checksum

*HELLO123*
Code 39 example preview with checksum
✓ Generated Successfully
Ready to download as PNG image
📊

How to Use This Code 39 Barcode Generator

The Code 39 Barcode Generator creates professional-grade barcodes suitable for industrial, retail, and administrative applications. This tool generates clean, scannable barcodes that meet industry standards for various identification and tracking needs.

Getting Started:

  1. Enter your text: Type the data you want to encode, using supported characters (A-Z, 0-9, and special symbols)
  2. Configure options: Choose checksum inclusion, extended character set, and visual settings
  3. Adjust dimensions: Set bar width and height based on your scanning requirements and printing needs
  4. Generate barcode: Click generate to create your barcode with real-time preview
  5. Download result: Save as PNG image for printing or digital use

Best Practices:

  • Keep text concise - shorter barcodes scan more reliably
  • Use uppercase letters for standard compatibility
  • Include checksums for critical applications
  • Test barcodes with your actual scanning equipment
  • Maintain adequate quiet zones (white space) around printed barcodes

The generated barcodes follow ISO/IEC 16388 standards and are compatible with all major barcode scanning systems and software applications.

How It Works

Code 39 barcode generation involves converting each character into a unique pattern of wide and narrow bars and spaces:

  1. Character Validation: Input text is validated against Code 39 character set (standard or extended mode)
  2. Checksum Calculation: If enabled, a modulo-43 checksum digit is calculated and appended to the data
  3. Pattern Encoding: Each character is converted to its corresponding 9-element pattern (5 bars, 4 spaces)
  4. Start/Stop Addition: Asterisk (*) patterns are added at the beginning and end of the barcode
  5. Canvas Rendering: The pattern is drawn on HTML5 Canvas with specified dimensions and spacing
  6. Text Addition: If enabled, human-readable text is added below the barcode for manual reference

The tool uses precise mathematical encoding to ensure each barcode meets industrial scanning requirements. Extended character support uses paired encoding where special combinations represent additional ASCII characters beyond the basic 43-character set.

Technical Details: Code 39 uses a variable-width encoding where each character consists of 5 bars and 4 spaces, with 3 elements being wide and 6 being narrow. This creates distinctive patterns that remain readable even when partially damaged or at various scanning angles.

When You Might Need This

Frequently Asked Questions

What characters can Code 39 barcodes encode?

Standard Code 39 supports uppercase letters A-Z, digits 0-9, and seven special characters: hyphen (-), period (.), asterisk (*), dollar sign ($), forward slash (/), plus sign (+), percent sign (%), and space. With extended character set enabled, it can encode the full ASCII character set including lowercase letters and additional symbols through special encoding sequences.

Should I include a checksum digit in my Code 39 barcode?

Including a checksum is recommended for applications requiring high accuracy and error detection, such as medical devices, inventory systems, or financial applications. The checksum adds an extra digit that helps detect scanning errors or damaged barcodes. However, it's optional in Code 39 and may not be necessary for simple applications like basic labeling.

What's the difference between standard and extended Code 39?

Standard Code 39 encodes 43 characters (A-Z, 0-9, and 7 special characters), while extended Code 39 can encode the full 128-character ASCII set. Extended mode uses special character combinations to represent additional characters like lowercase letters and symbols. Most barcode readers support both formats, but extended barcodes are longer and may be less reliable in some scanning environments.

How do I determine the optimal bar width and height for my barcode?

Bar width should be at least 2-3 pixels for screen display and 0.01 inches (0.25mm) for printing. Height should be at least 15% of the barcode width, typically 50-100 pixels for digital use. Consider your scanning distance and equipment - wider bars are better for handheld scanners, while fixed scanners can handle narrower bars. Always test with your actual scanning equipment.

Why do Code 39 barcodes start and end with asterisk (*) characters?

The asterisk (*) serves as both start and stop characters in Code 39 barcodes, creating a distinctive pattern that barcode readers use to identify the beginning and end of the encoded data. These characters are automatically added during generation and should not be included in your input text. The asterisks appear in the human-readable text below the barcode but represent special control patterns in the barcode itself.