What This Tool Does

This barcode generator produces standard 1D barcodes in the most common formats used in retail, logistics, and inventory. Enter your code, choose the format, customize size and color, and download as PNG (for printing) or SVG (for scaling). The tool uses the JsBarcode library to ensure barcodes are valid and readable by standard scanners.

Inputs Explained

How It Works

The JsBarcode library (loaded from CDN) accepts your data and format, validates the input, computes the proper bar/space sequence according to the format's specification, and renders it onto an SVG or Canvas element. The output is a scan-ready barcode that any standard barcode reader can decode.

Formula / Logic Used

Format-specific: each format has a unique pattern encoding (e.g., Code 128 has 107 characters × 11 modules each) Output = renderer(format, data, width, height)

Barcode Generator

Create Code 128, EAN-13, UPC-A, Code 39, and ITF barcodes — download as PNG or SVG.

Code 128: Any ASCII, most flexible. Use for general-purpose codes.
EAN-13: 12 digits + 1 check digit (13 total). European retail.
UPC-A: 11 digits + 1 check digit (12 total). US retail.
Code 39: Uppercase A-Z, 0-9, symbols. Common in industry.
ITF-14: 14 digits. Shipping cartons (GTIN).

Step-by-Step Example

Common barcode examples:

The tool automatically computes and appends check digits for EAN/UPC formats. Just provide the data portion.

Use Cases

Assumptions and Limitations

Disclaimer: For commercial retail products, register your company with GS1 to get globally unique EAN/UPC codes. This tool is ideal for internal use, asset tagging, and prototyping.

Frequently Asked Questions

Which barcode format should I use?

For general purposes (internal use, asset tags): Code 128 — flexible, accepts any text, compact. For retail products: EAN-13 (Europe/international) or UPC-A (US), but register with GS1 for real-world use. For industrial/old systems: Code 39. For shipping: ITF-14.

What's the difference between 1D and 2D barcodes?

1D barcodes (like these) store data in the width of parallel lines — typically 8-30 characters. 2D barcodes (QR codes) store data in a 2D grid — hundreds of characters. 1D requires a laser scanner; 2D works with any camera.

Do I need to buy a GS1 barcode?

Only if you're selling in retail stores. Retailers require globally unique GS1-registered codes. For internal inventory, asset tracking, or custom applications, generate your own Code 128 or Code 39 for free.

Why is my EAN-13 input rejected?

EAN-13 requires exactly 12 or 13 digits (the 13th is a check digit, auto-computed if you provide 12). The library rejects anything else. UPC-A requires 11 or 12 digits.

What's a check digit?

Most retail barcodes include a check digit calculated from the other digits, used to detect scanning errors. This tool automatically computes and appends check digits for EAN, UPC, and ITF-14 formats.

Should I print in black and white?

Black bars on white background is the most reliable. Modern scanners handle colored codes but may struggle with low-contrast combinations. If using color, keep bars dark and background light.

PNG or SVG — which to download?

SVG for printing at any size without quality loss, or web use. PNG for fixed-size outputs or when SVG isn't supported (older software, image editors). The tool offers both.

Can I read the barcode I generated?

Yes — test with any smartphone barcode scanner app (like the built-in camera on iOS 11+). Make sure the printed size is at least 1 inch wide and contrast is clear.

Sources and References

Related Calculators

QR Code GeneratorQR Code ReaderUUID GeneratorHash GeneratorImage Format ConverterPlaceholder Image