Skip to main content

Barcode Generator

Generate 1D barcodes in multiple formats.

Your files stay in your browser

How it works

  1. 1

    Enter your data

    Type the value you want to encode in the barcode.

  2. 2

    Choose a format

    Select the barcode type (CODE128, EAN-13, UPC-A, etc.) from the dropdown.

  3. 3

    Download

    Click PNG or SVG to download your barcode.

Common use cases

  • Retail product barcode

    Format: EAN-13, Data: 590123412345

  • Inventory label

    Format: CODE128, Data: INV-2026-00123

About This Tool

Create professional 1D barcodes in CODE128, EAN-13, EAN-8, UPC-A, CODE39, ITF-14, and Pharmacode formats with customizable bar width, height, colors, and text visibility — all generated entirely in your browser with no data sent to any server.

Barcodes remain one of the most widely used automatic identification technologies in the world. From retail product packaging and warehouse inventory labels to shipping containers and pharmaceutical packaging, barcodes provide a fast, reliable, and standardized way to encode machine-readable data on physical items. This tool lets you generate barcodes for any of these use cases without installing software, creating an account, or uploading your data to any service.

The tool supports seven barcode formats, each optimized for different industries and use cases. CODE128 is the most versatile format, capable of encoding all 128 ASCII characters, and is widely used in supply chain management, shipping, and internal business applications. EAN-13 is the standard retail barcode used on product packaging worldwide — it encodes a 13-digit number that uniquely identifies a product and its manufacturer. EAN-8 is a compact version of EAN-13 used on small products where a full 13-digit barcode would not fit. UPC-A is the primary retail barcode format used in the United States and Canada, encoding a 12-digit product identifier. CODE39 is a popular alphanumeric format used in automotive, defense, and industrial applications where both letters and numbers need to be encoded. ITF-14 (Interleaved Two of Five) is used for marking shipping containers and cartons with a 14-digit GTIN. Pharmacode is used exclusively in the pharmaceutical industry to encode a numeric identifier for packaging control.

Customization options let you tailor the barcode's appearance to your specific needs. Adjust the bar width to control the overall barcode width — narrower bars produce more compact codes, while wider bars are easier to scan at a distance. Set the bar height to balance between scannability and available label space. Change the foreground and background colors for branded packaging (note: most barcode scanners work best with black bars on a white background). Toggle the human-readable text below the barcode on or off depending on whether you want the encoded value to be visible.

Download options include SVG for print-ready, infinitely scalable output that stays razor-sharp at any size — ideal for professional printing on product packaging, shipping labels, and marketing materials. PNG download produces a high-resolution raster image suitable for embedding in documents, presentations, or digital displays. SVG is recommended for any print application because it eliminates pixelation regardless of how much the barcode is enlarged or reduced.

All barcode generation happens entirely in your browser using the JsBarcode library. Your data — including product codes, inventory numbers, and pharmaceutical identifiers — is never transmitted to any server. This makes the tool safe for generating barcodes for unreleased products, proprietary inventory systems, or any other sensitive data.

More examples

Examples

Retail product barcode

Input

Format: EAN-13, Data: 590123412345

Output

Scannable EAN-13 barcode ready for print

Inventory label

Input

Format: CODE128, Data: INV-2026-00123

Output

CODE128 barcode SVG for warehouse labels
Frequently Asked Questions
What barcode formats are supported?
CODE128 (general purpose), EAN-13 (international retail), EAN-8 (compact retail), UPC-A (US/Canada retail), CODE39 (alphanumeric industrial), ITF-14 (shipping containers), and Pharmacode (pharmaceutical industry).
Is my data sent to a server?
No. All barcode generation happens entirely in your browser using the JsBarcode library. Your data never leaves your device.
What are the input requirements for EAN-13 and UPC-A?
EAN-13 requires 12 or 13 digits (the check digit is auto-calculated if you provide 12). UPC-A requires 11 or 12 digits. EAN-8 needs 7 or 8 digits. CODE128 accepts any ASCII text. Pharmacode accepts a number between 3 and 131070.
Which download format should I use?
Use SVG for print-ready, scalable output that stays sharp at any size. Use PNG for embedding in documents, presentations, or anywhere SVG is not supported.
Can I change the barcode colors?
Yes. You can set custom foreground and background colors. However, for maximum scanner compatibility, black bars on a white background are strongly recommended. Some scanners may struggle with low-contrast or non-standard color combinations.
What is the difference between EAN-13 and UPC-A?
UPC-A is a 12-digit barcode used primarily in the US and Canada. EAN-13 is a 13-digit international standard used worldwide. A UPC-A code can be converted to EAN-13 by prefixing it with a zero. Both serve the same purpose of identifying retail products.
Can I generate barcodes for Amazon or Etsy products?
Yes. Amazon and Etsy both accept EAN-13 or UPC-A barcodes for product listings. Enter your GS1-assigned product number (without the check digit) and the tool will calculate the correct check digit automatically.
How do I ensure my barcode will scan correctly?
Use black bars on a white background, ensure adequate quiet zones (blank space) around the barcode, and set a bar width that is large enough for your scanner to resolve. For print, use SVG output at the physical size recommended for your barcode format.

Learn More

Related Guides