Barcode Generator

Generate barcodes instantly. Enter your text or number, choose a format, and download as SVG or PNG — all processed locally in your browser.

How to Generate a Barcode

Enter your text or number in the input field, select the barcode format (Code128 for general use, EAN-13 for retail products), and click "Generate Barcode." The barcode is rendered as an SVG image that you can download in SVG or PNG format. All processing happens locally in your browser — nothing is uploaded to any server.

Barcodes are machine-readable representations of data using patterns of parallel lines with varying widths and spacings. They are universally used in retail, logistics, healthcare, and manufacturing for fast, accurate data capture. A barcode scanner reads the pattern of bars and spaces, converting them back into the original text or number.

Barcode Format Comparison

FeatureCode128EAN-13
Character SetAll 128 ASCII charactersNumeric only (0-9)
LengthVariableFixed 13 digits
Check DigitAutomaticAutomatic (13th digit)
Primary UseShipping, inventory, generalRetail products worldwide
DensityHigh (compact)Medium

Common Barcode Applications

  • Retail: EAN-13 barcodes identify products at point-of-sale terminals worldwide. Each product has a unique barcode linked to its price and inventory record.
  • Shipping & Logistics: Code128 barcodes track packages through the supply chain, from warehouse picking to final delivery.
  • Inventory Management: Barcodes enable quick stock counting, reducing human error and speeding up warehouse operations.
  • Healthcare: Patient wristbands, medication labels, and lab specimens use barcodes to prevent identification errors.
  • Libraries: Books use barcodes based on ISBN numbers for checkout and inventory management.

Understanding Code128

Code128 is one of the most widely used barcode symbologies due to its high data density and ability to encode the full ASCII character set. It uses three code sets (A, B, and C) that can be mixed within a single barcode to optimize encoding. Code set A covers uppercase letters and control characters, set B covers upper and lowercase letters, and set C efficiently encodes pairs of digits. The barcode includes a start character, data characters, a checksum character, and a stop character, all encoded as patterns of bars and spaces.

Frequently Asked Questions

What barcode formats are supported?

This tool supports Code128 and EAN-13. Code128 is a versatile high-density barcode that can encode all 128 ASCII characters — ideal for product labels, shipping, and inventory. EAN-13 is the international standard for retail products (the barcode you see on items in stores), requiring exactly 13 digits including a check digit that is calculated automatically.

What is the difference between Code128 and EAN-13?

Code128 can encode any ASCII character (letters, numbers, symbols) and has variable length, making it versatile for many applications. EAN-13 is fixed at 13 digits (numbers only) and is the global standard for retail product identification. Use Code128 for general-purpose barcodes and EAN-13 for retail products.

Can I use these barcodes commercially?

The barcodes generated by this tool are standard formats and can be used for any purpose. However, if you are generating EAN-13 barcodes for retail products, you need a valid GS1 company prefix to ensure your barcode numbers are unique globally. Contact your local GS1 organization to obtain a company prefix.

How do I download the barcode?

Click 'Download SVG' for a scalable vector format that stays sharp at any size — ideal for print. Click 'Download PNG' for a raster image suitable for screens and documents. SVG is recommended for professional printing as it maintains quality regardless of the size you print it at.