โœ… Copied!
๐Ÿ“ Barcode Settings
๐ŸŽจ Appearance
Width (module) 2
Height 80 px
Font Size 16 px
๐Ÿ“Š Barcode Preview CODE128

What Is a Barcode?

A barcode is a machine-readable representation of data โ€” typically numbers or letters โ€” encoded as a pattern of parallel black and white bars of varying widths. When scanned, the pattern is decoded back into the original data.

Barcodes have been used since the 1970s (the first scan was a pack of Wrigley's gum in 1974) and remain the global standard for retail, logistics, inventory, and manufacturing. There are hundreds of barcode formats, each designed for a specific purpose.

How to Use This Tool

  • Pick a format โ€” Code 128, EAN-13, UPC-A, Code 39, ITF-14, MSI, Pharmacode, or Codabar.
  • Enter the value โ€” the exact content to encode. Each format has different requirements.
  • Customize appearance โ€” bar width, height, font size, colors.
  • Download โ€” as PNG (raster) or SVG (vector, infinitely scalable).
  • Print or copy โ€” use the buttons for one-click actions.

Supported Barcode Formats

Format Character Set Typical Use
Code 128 Full ASCII (0-127) Shipping, inventory, general-purpose. Compact and versatile.
EAN-13 13 digits (12 + checksum) Retail products worldwide (outside US/Canada).
UPC-A 12 digits (11 + checksum) Retail products in US and Canada.
Code 39 Uppercase A-Z, 0-9, and some symbols Automotive, defense, ID cards. Older but widely supported.
ITF-14 14 digits (13 + checksum) Shipping cartons, corrugated boxes, GTIN-14.
MSI Digits 0-9 only Inventory control, storage bins, warehouse shelves.
Pharmacode Integers 3-131070 Pharmaceutical packaging, small spaces.
Codabar Digits 0-9, -, $, :, /, ., + Blood banks, libraries, courier packages.

Format Details

Code 128

The most versatile format. Encodes any ASCII character and is compact. Three sub-codes (A, B, C) handle different data types, but the library chooses automatically. Best for general-purpose use when you don't have a specific standard to follow.

EAN-13

The international retail standard used on billions of products. It's exactly 13 digits, where the last digit is a checksum. If you enter only 12 digits, the tool calculates the 13th automatically. Used everywhere except the US and Canada.

UPC-A

The North American retail standard. Exactly 12 digits with the last one being a checksum. Similar to EAN-13 but for the US and Canada market.

Code 39

An older format that's still widely supported. Limited to uppercase letters, digits, and a few symbols (including space, `-`, `.`, `$`, `/`, `+`, `%`). Slower to encode than Code 128 but works on almost any scanner.

ITF-14 (Interleaved 2 of 5)

A 14-digit format used on shipping cartons. The name "interleaved" means digits are encoded in pairs. The last digit is a checksum. Standard for GTIN-14 codes on corrugated boxes.

MSI

A numeric-only format originally from MSI Data Corporation. Used mostly in warehouse and inventory systems. Supports digits only.

Pharmacode

A simple numeric format used in pharmaceutical packaging. It's essentially a series of bars with no embedded checksum. Values range from 3 to 131070.

Codabar

Used in blood banks, libraries, and some logistics operations. Encodes digits and a few special characters. Each barcode starts and ends with a specific letter (A, B, C, or D).

Barcode Best Practices

  • Ensure high contrast โ€” black bars on white background is the standard.
  • Print at the right size โ€” most barcodes have minimum and maximum X-dimension (bar width) specifications.
  • Use adequate quiet zone โ€” most formats require at least 10ร— the narrow bar width as whitespace on both sides.
  • Print at 300 DPI or higher โ€” for sharp, scan-friendly bars.
  • Test before bulk printing โ€” always verify with a real scanner.
  • Avoid distortion โ€” barcodes must be scaled proportionally, not stretched.
  • Print on matte surfaces โ€” glossy materials can cause reflections that confuse scanners.

Common Use Cases

  • Retail โ€” EAN-13 and UPC-A for product packaging
  • Shipping โ€” ITF-14 for cartons, Code 128 for pallets
  • Inventory โ€” Code 128 or MSI for warehouse management
  • Asset tracking โ€” Code 39 for equipment labels
  • Event tickets โ€” Code 128 for unique ticket IDs
  • Pharmaceuticals โ€” Pharmacode for medicine packaging
  • Blood banks โ€” Codabar for sample identification
  • Business cards โ€” Code 128 with a URL or contact info

Barcode vs QR Code

  • Barcode (1D) โ€” linear, one-dimensional. Stores limited data (typically 8-50 characters). Read by laser scanners and imagers.
  • QR Code (2D) โ€” matrix, two-dimensional. Stores up to ~3 KB. Read by cameras and 2D imagers.
  • Best for barcodes โ€” retail products, shipping labels, small amounts of data
  • Best for QR codes โ€” URLs, contacts, Wi-Fi credentials, large data

Frequently Asked Questions

  • Are these barcodes scannable? โ€” Yes, all barcodes generated here follow official specifications and scan with standard readers.
  • Can I use them commercially? โ€” Yes. Barcodes are freely usable. Note that using EAN-13 or UPC-A commercially usually requires a GS1 number issued to your business.
  • What's a check digit? โ€” Some formats include a mathematical checksum as the last character to detect scanning errors. The tool auto-calculates it for EAN-13, UPC-A, and ITF-14.
  • PNG or SVG? โ€” SVG for printing (infinitely scalable), PNG for digital use.
  • Why does my barcode fail to scan? โ€” Common causes: too small, low contrast, low print resolution, missing quiet zone, or the scanner isn't configured for that format.
  • Is this free? โ€” Yes, completely free with no limits.

Related Tools

Privacy Note

Everything runs in your browser. The barcodes you generate are never uploaded, tracked, or logged. Close the tab and everything is gone.