Barcode Generator

Create Code 128, Code 39, EAN-13, EAN-8, UPC, ITF-14, MSI, and Pharmacode barcodes from any text or number. Adjust bar width, height, margins, colors, and the printed value, then download a PNG or SVG, or copy the image.

Input

Length: 0 (needs 1-80 characters)

Barcode Format

Universal - supports all ASCII characters

Preview

Enter a value to generate a barcode

Output Format

Settings

2
100 px
10 px
14 px
Text Alignment

How to Use

  1. Enter the value to encode in the input field
  2. Choose the barcode format that matches your needs, or press Auto Detect to let the tool pick one
  3. Adjust settings like width, height, and colors if needed
  4. Pick PNG or SVG under the preview, then download it or copy the image

Understanding Barcode Symbologies and How to Encode Them

What this generator does

A barcode packs a short string — a product code, an SKU, a batch number — into a pattern of bars and spaces that a scanner can read. This generator turns whatever value you type into that pattern, drawing the result as a live preview. It covers eight symbologies: Code 128, Code 39, EAN-13, EAN-8, UPC, ITF-14, MSI, and Pharmacode, each encoding data under its own rules. An Auto Detect mode inspects your input and picks a compatible symbology when you are not sure which one fits.

Beyond the raw bars, you control bar width, height, margins, the line and background colors, and the human-readable value printed underneath. Once the layout looks right, download it as a PNG for everyday use or as an SVG for print work that has to stay sharp at any size, or copy the image straight to the clipboard.

Choosing the right symbology

The format you pick depends on where the barcode will be scanned. Code 128 is the versatile choice for internal labels because it encodes the full ASCII set, letters and symbols included. Code 39 still appears in industrial and defense settings where older scanners are common. For anything sold in a shop, retail symbologies apply: EAN-13 and EAN-8 for international products, UPC for the United States. ITF-14 marks shipping cartons, MSI turns up on warehouse shelf labels, and Pharmacode is the dedicated standard for pharmaceutical packaging.

A concrete example

Enter 590123412345 and choose EAN-13. The symbology expects twelve digits plus a thirteenth check digit calculated from the first twelve. If your value is off, the tool reports the correct check digit instead of drawing an invalid code, so you can fix it before printing. Pharmacode behaves differently again: it accepts only a number between 3 and 131070 and rejects anything outside that window.

Notes and edge cases

Each symbology enforces its own length and character rules — EAN-8 wants seven to eight digits, MSI accepts digits only, and Code 39 allows A–Z, 0–9, and a handful of symbols. When the input breaks a rule, an inline message names the problem, whether it is an invalid character, a length mismatch, or a bad check digit. You can also hide the printed value, realign it left, center, or right, and adjust the font size when the label has to fit a tight space.

Frequently Asked Questions

Every symbology here — Code 128, EAN-13, UPC, ITF-14, Pharmacode and the rest — generates without a watermark, a scan cap, or locked settings. Customize the colors, size, and value label and export as many PNG or SVG barcodes as you need.