QR ToolsCode 128

Barcode Generator

Create crisp Code 128 barcodes for products, inventory management, and shipping labels. Instant PNG export and label printing.

Barcode Data Presets
Bar Height80px
Bar Thickness (Resolution)2px / module
Generated Barcode Preview

How to Use Barcode Generator

Follow these simple steps to complete your task in seconds.

1

Enter Barcode Text or Code

Enter alphanumeric characters, product SKUs, or inventory tracking numbers.

2

Adjust Bar Width and Height

Customize bar density, height, and toggle the human-readable text label underneath.

3

Download or Print Barcode

Export as crisp high-resolution PNG or print directly onto adhesive label sheets.

Practical Use Cases for Barcode Generator

Real-world scenarios where professionals, creators, and everyday users rely on this tool.

Warehouse & Inventory SKUs

Generate durable Code 128 barcode labels for warehouse storage bins, internal asset tags, and stock picking bins.

Retail Packaging & Price Tags

Print sharp, high-contrast barcode stickers for boutique products, retail merchandise, and Point-of-Sale (POS) scanners.

Asset Tracking & Logistics

Track office hardware, tools, shipping boxes, and manifest documents with scannable serial number barcodes.

Why Choose Quicklity for Barcode Generator

Engineered for speed, privacy, and flawless conversion accuracy.

Standard Code 128 Format

Encodes all 128 ASCII characters with mandatory start codes and modulo-103 checksums.

High-Density Bar Rendering

Rendered on HTML5 canvas with sub-pixel crispness to ensure instant scanning by any optical barcode reader.

Print Ready Labels

Integrated 1-click print function formatted for retail labels, bin tags, and packaging.

100% In-Browser Privacy

Product SKUs and inventory tracking numbers never leave your device.

Code 128 Barcode Standard & Scanner Best Practices

Why Code 128 is the most widely adopted 1D barcode format worldwide

Full 128-Character ASCII Set

Alphanumeric

Unlike numeric-only barcodes (UPC/EAN), Code 128 natively encodes uppercase and lowercase letters, numbers 0-9, and ASCII punctuation characters.

High-Density Linear Encoding

Compact

Features variable four-width bars and spaces for exceptional data density, making it ideal for compact shipping labels and small merchandise tags.

Best Practices & Pro Tips

  • •Maintain adequate “Quiet Zones”: leave at least 0.25 inches (6mm) of pure white margin to the left and right of the barcode.
  • •Avoid fuzzy resizing: download at full resolution and avoid stretching the aspect ratio when placing into label templates.
  • •Laser, CCD, and smartphone camera scanner apps all read Code 128 natively without special configurations.

Privacy & Browser Processing Notes

  • ✓Generated 100% client-side via JavaScript Canvas. Your SKU, pricing, and internal inventory numbers remain completely private.
  • ✓Free for personal and commercial barcode printing with zero licensing royalties.
Technical Reference & Guide100% In-Browser Execution

Linear 1D Barcode Symbology & Code 128 Specification

Understanding Optical Reflectance, Start/Stop Patterns, Modulo-103 Checksum Algorithms, and Retail Label Engineering

Code 128 Modulo-103 Checksum Formula

Mathematical Specification
\text{Checksum Value} = \left( \text{Start Value} + \sum_{i=1}^{n} (i \times \text{Value}_i) \right) \pmod{103}

Code 128 is a high-density linear 1D barcode symbology defined by ISO/IEC 15417. It encodes the entire 128-character ASCII table using variable width bars and spaces, safeguarded by a mandatory self-checking Modulo-103 mathematical checksum.

SymbolParameter NameMathematical Definition & Domain
Start ValueStart Code WeightNumeric value corresponding to Start A (103), Start B (104), or Start C (105).
Value_iCharacter ValueNumeric symbol value of each data character in positions 1 through n.
iPosition Weight MultiplierPositional weight factor multiplying each sequential character value.
mod 103Modulo DivisorMathematical remainder determining the final verifying checksum symbol.

Step-by-Step Checksum Calculation for SKU: "AB12"

Scenario: Calculating the mandatory Modulo-103 verification character for encoding product code "AB12" in Code 128B.

Data StringAB12
Code SetCode 128 Subset B
Start Code ValueStart B = 104
1

Look up character symbol values

A = 33, B = 34, 1 = 17, 2 = 18.

2

Apply positional weighting sum

Sum = 104 + (1 × 33) + (2 × 34) + (3 × 17) + (4 × 18) = 104 + 33 + 68 + 51 + 72 = 328.

3

Compute Modulo-103 remainder

328 ÷ 103 = 3 with a remainder of 19 (328 mod 103 = 19).

4

Append Checksum Character and Stop Pattern

Value 19 corresponds to character "3". Final encoded transmission: [Start B] [A] [B] [1] [2] [Check 19] [Stop Pattern].

Calculated Result & Resolution

The optical scanner computes this exact checksum during scan; if the remainder does not match 19, the scan is rejected to prevent inventory errors.

Key Practical Takeaway: The Modulo-103 checksum ensures a data error rate of less than 1 in 10 million characters scanned.

Barcode Symbology Comparison: Code 128 vs. UPC-A vs. Code 39 vs. QR Code

SymbologyCharacter SetData CapacityPrimary Industry Use CaseHardware Scanner Compatibility
Code 128Full 128 ASCII (Alphanumeric)Up to 80+ charactersLogistics, Shipping, Inventory, Warehouse Asset TrackingUniversal (All 1D laser & 2D imagers)
UPC-A / EAN-13Numeric Only (0-9)Fixed 12 or 13 digitsRetail Point-of-Sale (POS) Supermarket CheckoutUniversal in retail scanners
Code 39Uppercase A-Z, 0-9, limited symbolsLow density (Long bars)Automotive, Military, Healthcare identity badgesUniversal (Simple optical readers)
QR Code (2D)Binary, Kanji, AlphanumericUp to 7,089 numeric charactersMobile smartphone marketing, Wi-Fi, paymentsRequires 2D camera imager (not 1D laser)

Note: Code 128 is preferred over UPC for internal inventory because it encodes custom alphanumeric SKUs without requiring official GS1 company prefix licenses.

Engineering Durable Barcode Labels for Retail and Warehouse Scanning

Linear 1D barcodes operate on optical reflectance contrast. A red laser or CCD optical sensor illuminates the printed pattern, measuring the reflection off the white spaces while the black bars absorb the light beam. For a barcode scanner to reliably decode a label in under 50 milliseconds, the physical print must adhere to precise geometric and contrast tolerances.

First and foremost is the "Quiet Zone"—the uninterrupted white margin to the left of the start character and to the right of the stop character. For Code 128, the quiet zone must measure at least 10 times the width of the narrowest bar (X-dimension), or at least 0.25 inches (6.4 mm). Truncating this margin causes scanners to misread the start delimiter.

Quicklity Barcode Generator renders pixel-sharp vector barcodes directly onto HTML5 Canvas elements with zero compression artifacts. You can print directly onto Avery adhesive label templates or export high-resolution PNG assets for packaging design, completely free and 100% client-side.

Common Technical Mistakes & How to Avoid Them

Printing barcodes on colored or dark textured backgrounds (e.g., black bars on kraft brown cardboard).

Impact: Insufficient optical reflectance ratio prevents red laser scanners from detecting the bars.

Recommended Fix: Always print high-contrast black bars on clean white or bright yellow label material.

Scaling the barcode non-proportionally in image editing software.

Impact: Distorting the width-to-height ratio of individual bars destroys the 1:2:3:4 relative thickness scaling.

Recommended Fix: Export directly at the required resolution rather than stretching an existing low-res graphic.

Local Browser Execution & Privacy Architecture

Web API UsedHTML5 2D Canvas & Vector Path Geometry Engine
Execution MechanismCalculates variable-width bar widths in sub-pixel floating point accuracy and renders directly to a crisp 300 DPI canvas export.
Confidentiality Guarantee100% Client-Side. Your proprietary inventory SKUs, serial numbers, and pricing codes remain completely private.

Frequently Asked Questions about Barcode Generator

Everything you need to know about using this tool.

This tool generates Code 128B barcodes, one of the most widely used linear barcode symbologies in shipping, inventory management, retail, and manufacturing.