Barcode Generator

Generate Code 128 and Code 39 barcodes online. Customizable width, height, font size. Download as PNG or copy as data URI. Free client-side barcode generator.

Everything runs in your browser — your data is never sent to any server.

Why Use a Barcode Generator?

Barcodes are essential for product labeling, inventory management, shipping, and asset tracking. Our barcode generator creates scannable Code 128 and Code 39 barcodes directly in your browser with no external dependencies. Customize dimensions, text display, and download high-quality PNG images.

Key Features

  • Code 128 and Code 39 barcode types
  • Client-side Canvas rendering — no server needed
  • Customizable bar width, height, font size, and text display
  • Download as PNG or copy as data URI
  • Pure JavaScript encoding algorithms with no external libraries

How It Works

  1. Enter the text you want to encode
  2. Select barcode type (Code 128 or Code 39)
  3. Adjust bar width, height, and text options
  4. Download the generated barcode as PNG

Technical Details

This generator implements Code 128 (subset B) and Code 39 encoding algorithms entirely in client-side JavaScript. Code 128 uses a start code, data characters, modulo-103 checksum, and stop code. Code 39 uses asterisk delimiters with inter-character gaps. Rendering is done on an HTML5 Canvas element for crisp output at any scale.

Frequently Asked Questions

What is Code 128?

Code 128 is a high-density linear barcode that can encode all 128 ASCII characters. It's widely used in shipping, packaging, and supply chain management due to its high data density and reliability.

What is Code 39?

Code 39 (also known as Alpha39 or Code 3 of 9) can encode uppercase letters, digits, and a few special characters. It's commonly used in automotive, defense, and health industries.

Are the generated barcodes scannable?

Yes, the barcodes are generated using standard encoding algorithms and should be scannable with any standard barcode scanner. Ensure adequate bar width and height for reliable scanning.

Related tools