About this tool
Linear 1D Barcodes (governed by ISO/IEC 15417 Code 128 and ISO/IEC 15420 EAN-13 standards) are the universal machine-readable symbols driving global retail POS scanning, logistics warehouse package tracking, asset tagging, and pharmaceutical labeling. Linear barcodes occupy minimal vertical height and enable ultra-fast, long-distance laser scanner reads. This tool generates pixel-perfect Code 128 barcodes locally, offering customizable bar widths, quiet zones, human-readable text labels, and vector SVG/PNG exports.
How to Use This Tool (Step-by-Step)
Enter Text or Serial Number
Type your SKU serial number, tracking ID, or alphanumeric string into the input box.
Configure Barcode Dimensions
Adjust barcode height, narrow bar width multipliers, quiet margins, and toggle human-readable text labels.
Download Vector SVG or PNG
Review the rendered barcode. Download crisp vector SVG files for industrial printing or copy PNG bitmaps for thermal label printers.
Full ASCII Code 128 ISO Standard
Encodes all 128 ASCII characters with automatic modulo-103 checksum calculation, preventing accidental misreads.
Lossless Vector SVG Output
Renders mathematical vector path SVG elements, ensuring razor-sharp edges even at 1200 DPI thermal printing resolutions.
100% Client-Side Air-Gapped
Bar pattern generation executes entirely inside local browser memory. Internal proprietary SKU serials are never uploaded.
Barcode Scanning Reliability & Print Tips
- •Maintain white Quiet Zones at both ends: Leave margins at least 10x the width of narrow bars. Cluttered edges prevent optical scanner recognition.
- •Never print barcodes on red backgrounds: Red laser scanners read red paper as pure white, erasing contrast completely. Always use crisp black-on-white.
- •Do not set bar widths too thin on 203 DPI thermal printers: Thermal ink bleed fuses ultra-thin lines together. Use a width multiplier of at least 2.
Code & Transformation Examples
Code 128 vs EAN-13 Standard Comparison
• 字符集支持 : 完整 128 个 ASCII 字符 (数字、大小写英文字母、符号全部支持)
• 长度限制 : 可变长度 (根据需要编码任意长度编码)
• 应用领域 : 快递面单 (顺丰/中通)、仓储货架标签、企业固定资产标签• 字符集支持 : 纯数字 0-9 (严格固定 13 位数字)
• 前缀含义 : 前 3 位代表国家/地区代码 (如中国商品条码以 690-699 开头)
• 应用领域 : 超市预包装零售商品、出版图书 ISBN 条形码* Code 128 is ideal for internal asset tracking; selling products in physical retail stores mandates certified EAN-13 codes.
JsBarcode Frontend Generation Snippet
<svg id="barcode"></svg>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/JsBarcode.all.min.js"></script>
<script>
JsBarcode("#barcode", "ITEM-2026-X99", {
format: "CODE128",
width: 2,
height: 80,
displayValue: true,
fontSize: 16,
margin: 10
});
</script>JsBarcode 会在 SVG 内部生成纯净的矩形 <rect> 元素,体积仅数千字节,打印机输出时线条极其精准。* Maintaining adequate quiet margins ensures optical scanners capture bar boundaries instantly.
Frequently Asked Questions
Q: Why is my barcode scanner slow to read 1D barcodes?
A: 1D laser lines must bisect all bars horizontally. If barcode heights are too short, minor tilting breaks the laser beam path. Keep heights above 15mm.
Q: Do I need to calculate the Code 128 check digit manually?
A: No. The generator automatically computes the modulo-103 weighted check character and embeds it within the stop pattern per ISO standards.
Q: Can I paste generated barcodes directly into Word or Excel?
A: Yes. Copying the generated image or inserting downloaded PNG/SVG assets into Word, Excel, or thermal label design software works seamlessly.