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
- Barcode Data: The code to encode. Format-specific rules apply (e.g., EAN-13 requires 12-13 digits).
- Format: Code 128 (general), EAN-13 (retail), UPC-A (US retail), Code 39 (industrial), ITF-14 (logistics).
- Width & Height: Bar width in pixels and total barcode height.
- Show Text: Display the readable text below the bars.
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
Barcode Generator
Create Code 128, EAN-13, UPC-A, Code 39, and ITF barcodes — download as PNG or SVG.
Step-by-Step Example
Common barcode examples:
- Code 128:
ORDER-2025-0423(any text, most flexible) - EAN-13:
5901234123457(European retail, 13 digits) - UPC-A:
036000291452(US retail, 12 digits) - Code 39:
ABC-123(uppercase, digits, dashes) - ITF-14:
12345678901231(shipping cartons, 14 digits)
The tool automatically computes and appends check digits for EAN/UPC formats. Just provide the data portion.
Use Cases
- Inventory management: Generate Code 128 barcodes for internal stock tracking, no product code registration needed.
- Asset tagging: Label equipment, books, or files with scannable Code 39 codes for easy check-in/check-out.
- Event tickets: Create unique Code 128 barcodes for admission tickets that can be scanned at entry.
- Shipping labels: Generate ITF-14 codes for GTIN-based shipping carton identification.
- Small retail: Create product barcodes for small businesses that don't need registered GS1 codes.
Assumptions and Limitations
- For EAN and UPC formats, you need a GS1-registered prefix to sell in real retail. This tool generates valid format but not globally unique codes.
- Barcode scanners need sufficient contrast — avoid low-contrast colors (light grey on white) for printed output.
- The tool generates 1D barcodes. For 2D codes, use the QR Code Generator.
- The JsBarcode library is loaded from jsDelivr CDN on first use; requires internet initially.
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
- JsBarcode Library — Open-source barcode generation library used here.
- GS1 — Barcodes — Official body for retail barcode standards.
- Wikipedia — Code 128 — Detailed explanation of Code 128 format.
- Wikipedia — International Article Number — EAN-13 format and check digit calculation.