Barcode Generator
How It Works
01Input Data
Enter the code or text to encode
02Pick Symbology
Select Code 128, EAN, or UPC
03Configure Bar
Adjust width & height of bars
04Save & Export
Download in high-res SVG or PNG
What is a Barcode Generator?

The tool supports all the major barcode formats: Code 128, Code 39, EAN-13, EAN-8, UPC-A, UPC-E, and more. Each format has its own use case — EAN-13 is the global retail standard, UPC-A dominates North American retail, and Code 128 is widely used in logistics and shipping. You simply select your format, enter your data, and the barcode is generated instantly — ready to download as a high-resolution PNG or SVG file suitable for print.
Customization options let you control barcode dimensions, add human-readable text below the bars, and adjust sizing to match your label templates. The result is always a clean, scanner-ready barcode that works with all standard barcode scanners and smartphone scanning apps. It's free, fast, and requires no account.
Pro Tip: For more relevant tools in the generators category, try our Meme Generator Calculator.
How to Generate Your Barcode?
How are Barcodes Calculated?
To generate a valid barcode, the system must encode your data into a precise sequence of bars and spaces. Here's a complete breakdown:
Think of a barcode like a secret code: each character in your input is translated into a unique pattern of thick and thin lines. The scanner reads these patterns by measuring the widths of alternating dark and light zones.
Barcode Structure — The Anatomy:
Every barcode begins with a mandatory blank margin called the Quiet Zone. This tells the scanner "a barcode is about to start." Without it, the scanner cannot distinguish the symbol from its surroundings.
Standard: Must be at least 10x the width of the narrowest bar (X-dimension).
A specific bar pattern that signals the beginning of data. Different symbologies use different start codes. Code 128 has three start codes (A, B, C), each optimizing for different character sets.
Example: Code 128B uses Start Code B for mixed uppercase/lowercase data.
Each character from your input is mapped to a unique pattern. In Code 128, each character uses exactly 11 modules (units of width) arranged as 3 bars and 3 spaces of varying widths.
Example: The letter "A" in Code 128B = pattern 10100011000
A mathematically computed check character is appended to detect scan errors. This is followed by the Stop Character and a trailing Quiet Zone.
Code 128 uses Modulo 103 weighted checksums for maximum error detection.
Checksum Algorithms — Error Detection:
Checksums are the barcode's built-in error-detection system. Each symbology uses a different mathematical method to ensure data integrity during scanning.
Check = Σ(value × position) mod 103
Start with the Start Code value. Multiply each data character's value by its position (1, 2, 3...), sum everything, then divide by 103. The remainder is your check digit.
Example: "Hi" → Start(104) + H(40×1) + i(73×2) = 104+40+146 = 290. 290 mod 103 = 84
Check = (10 − (Sum mod 10)) mod 10
Alternate between multiplying digits by 1 and 3 (from left to right). Sum the products, divide by 10, and subtract the remainder from 10.
Example: UPC "03600029145?" → Check digit = 2
Barcode Generator – Create Barcodes Online for Free In Practice
A global logistics partner needs to encode product SKU "ACE-99" using Code 128. The generator maps each character to its bar pattern and calculates the Modulo 103 checksum automatically. The result is a high-density barcode that can be scanned at 150 labels per minute with zero manual entry errors.
- Step 1: Select Code 128B (supports mixed alphanumeric).
- Step 2: Input "ACE-99" — 6 characters, validated against the Code 128 character set.
- Step 3: The engine encodes Start(104) + A(33) + C(35) + E(37) + -(13) + 9(25) + 9(25) with positional weighting.
- Step 4: Checksum: (104 + 33×1 + 35×2 + 37×3 + 13×4 + 25×5 + 25×6) mod 103 = 45.
- Step 5: The final barcode has 8 encoded symbols + Stop pattern, totaling 99 modules wide.
Sizing & Read Range Analysis
Effective Range
Up to 12"
Effective Range
Up to 18"
Effective Range
Up to 36"
Effective Range
Up to 60"
How to use this chart
Select an X-dimension based on your scanner distance. Retail Point of Sale (POS) typically requires 13 mil (0.33mm), while warehouse inventory tracking uses 20 mil+ for long-range scannability.
Technical Risk Analysis
Contrast Ratio Risk
Standard laser scanners require at least 80% reflectance difference between bars and spaces.
Action: Ensure bars are dark (Black/Blue) on a pure white background.
Barcode Symbology Specifications
Symbology Comparison Guide
Choosing the right barcode architecture depends on your data type, space availability, and industry standards. Review our comparison matrix to select the best fit for your application.
| Symbology | Data Type | Density | Primary Use Case |
|---|---|---|---|
| Code 128 | Full ASCII | High | Logistics, Shipping, Healthcare |
| Code 39 | Alphanumeric | Low | Defense, Automotive, Asset Tags |
| EAN-13 / UPC | Numeric Only | Medium | Retail, Grocery, POS Checkout |
| ITF-14 | Numeric Only | High | Packaging, Corrugated Cases |
| EAN-8 | Numeric Only | Medium | Small Products, Confectionery |
X-Dimension and Sizing Standards
The X-dimension (the width of the narrowest bar) is the most critical factor in barcode scannability. If the X-dimension is too small, your printer may 'smudge' the bars together; if it's too large, the scanner might not see the entire code. Understanding X-dimension standards is essential for compliance.
Retail Standards (POS)
For UPC/EAN retail labels, the nominal X-dimension is 0.33mm (13 mils). Labels can be scaled between 80% and 200% of this size depending on the available package real estate. Most retail scanners are optimized for this range.
Logistics Standards (Warehouse)
For shipping labels (Code 128), a larger X-dimension (typically 0.50mm or 20 mils) is preferred to ensure scanning from a distance in warehouse environments with industrial handheld or fixed-mount scanners.
| X-Dimension | Exact Width | Scan Range | Application |
|---|---|---|---|
| 10 mil | 0.25mm | Up to 12" | Small labels, Pharmaceutical |
| 13 mil | 0.33mm | Up to 18" | Retail POS (Standard) |
| 20 mil | 0.50mm | Up to 36" | Warehouse, Inventory |
| 40 mil | 1.00mm | Up to 60" | Industrial, Long-range |
Barcode Printing Best Practices
A perfectly generated barcode can still fail if printed incorrectly. The printing process introduces variables like ink spread (bar gain), substrate texture, and resolution limitations that directly impact scannability. Follow these guidelines to ensure production-ready output.
Print Resolution
Always use a minimum of 300 DPI for barcode printing. Thermal transfer printers at 600 DPI produce the sharpest results. Inkjet printers below 300 DPI can cause "fuzzy" bars that increase misread rates.
Bar Gain (Ink Spread)
When ink hits paper, bars "grow" slightly wider. This bar gain (or press gain) can close narrow spaces. Professional systems apply a Bar Width Reduction (BWR) of 0.02-0.05mm to compensate.
Contrast Requirements
The minimum contrast ratio between bars and spaces should exceed 80% reflectance difference. Black bars on white is ideal. Avoid red/orange bars (laser scanners use red light and cannot see them).
Substrate & Orientation
Print on smooth, non-reflective surfaces. Avoid placing barcodes on curved surfaces or seams. The "picket fence" (vertical bars) orientation is preferred over "ladder" (horizontal) for better scan reliability.
Understanding GS1 Standards
GS1 is the global organization that manages the standards behind barcodes used in commerce. If you've ever scanned a product at a store, that barcode follows GS1 rules. Understanding these standards is essential for any business selling physical products.
GTIN (Global Trade Item Number)
The GTIN is the number encoded inside UPC and EAN barcodes. It consists of a Company Prefix (assigned by GS1), an Item Reference (assigned by you), and a Check Digit (calculated automatically). Every unique product needs its own GTIN.
GS1-128 (Application Identifiers)
GS1-128 extends Code 128 by adding Application Identifiers (AIs) — coded prefixes that define what the following data means. For example, AI (01) = GTIN, AI (17) = Expiry Date, AI (10) = Batch Number. This allows a single barcode to carry multiple data fields.
| GTIN Format | Digits | Barcode Type | Usage |
|---|---|---|---|
| GTIN-8 | 8 | EAN-8 | Very small products |
| GTIN-12 | 12 | UPC-A | North American retail |
| GTIN-13 | 13 | EAN-13 | International retail |
| GTIN-14 | 14 | ITF-14 | Outer cartons / cases |
Common Barcode Failures & Troubleshooting
Even with a perfectly generated barcode, real-world issues can prevent successful scanning. Here are the most common failures encountered in production environments and how to resolve them.
No-Read (Scanner Ignores Barcode)
Usually caused by insufficient quiet zones, too-small X-dimension, or the barcode being placed on a curved surface. Ensure the entire symbol is within the scanner's field of view.
Misread (Wrong Data Decoded)
Caused by print defects that alter bar widths. The bars are read as different characters. This is why checksums exist — they catch most misreads before bad data enters your system.
Substitution Error
A specific type of misread where one valid character is decoded as a different valid character. These are the most dangerous because checksums occasionally miss them. Print verification catches these.
Degradation Over Time
UV exposure, abrasion, moisture, and chemical exposure can gradually destroy barcodes. For harsh environments, use laminated labels, synthetic substrates, or laser-etched metal plates.
Industrial Barcode Applications
Technical Reference
Key Takeaways
Frequently Asked Questions
What is the ?
The tool supports all the major barcode formats: Code 128, Code 39, EAN-13, EAN-8, UPC-A, UPC-E, and more. Each format has its own use case — EAN-13 is the global retail standard, UPC-A dominates North American retail, and Code 128 is widely used in logistics and shipping. You simply select your format, enter your data, and the barcode is generated instantly — ready to download as a high-resolution PNG or SVG file suitable for print.
Customization options let you control barcode dimensions, add human-readable text below the bars, and adjust sizing to match your label templates. The result is always a clean, scanner-ready barcode that works with all standard barcode scanners and smartphone scanning apps. It's free, fast, and requires no account.
Pro Tip: For more relevant tools in the generators category, try our Meme Generator Calculator.
Can I download the barcode as an image?
Are the barcodes actually scannable?
What's the difference between EAN-13 and UPC-A?
Can I add text below the barcode?
Can I resize the barcode?
Is this free to use commercially?
Do I need an account?
What if my barcode won't scan?
Is the tool free?
Disclaimer
The results provided by this tool are for informational purposes only and do not constitute medical advice, diagnosis, or treatment. Always seek the advice of your physician or other qualified health provider with any questions you may have regarding a medical condition.