条形码生成器
免费在线生成多种格式(Code128、EAN、UPC、Code39)的条形码
⚙️ 设置
👁️ 预览
📖 格式参考
| 格式 | 适用场景 | 支持的字符 |
|---|---|---|
| Code 128 | Shipping, logistics | All ASCII |
| EAN-13 | Retail products (global) | 12 digits + check |
| EAN-8 | Small products | 7 digits + check |
| UPC-A | Retail products (US/Canada) | 11 digits + check |
| Code 39 | Military, automotive | A-Z, 0-9, special |
| ITF-14 | Shipping containers | 14 digits |
| Pharmacode | Pharmaceutical industry | 3-131070 |
| Codabar | Libraries, blood banks | 0-9, -, $, :, /, +, . |
🔥 热门工具
💡 使用场景
📋 如何使用
在设置面板的格式下拉菜单中选择条码类型:Code 128、EAN-13、EAN-8、UPC-A、Code 39、ITF-14、MSI、Pharmacode 或 Codabar。
在数据框中输入要编码的内容;切换格式时会载入一个有效示例,例如 EAN-13 的 5901234123457,直接用你自己的数据覆盖即可。
拖动条宽滑块(1 到 4 px)和高度滑块(30 到 200 px),直到条码尺寸与你需要的标签相符。
用两个取色器设置条码颜色和背景色,再用复选框决定是否显示条码下方的文字,或切换为平齐条码。
输入时预览会实时重绘;如果数据不符合所选条码类型的规则,例如 EAN-13 中出现字母,会显示红色提示。
用 PNG 或 SVG 按钮保存条码,或点击复制把 SVG 代码放到剪贴板。
💎 专业提示
- Download the SVG rather than the PNG when the barcode will be printed: vector bars stay sharp at any label size, while a scaled-up PNG blurs and can fail to scan.
- Keep the bars dark and the background light. Scanners read contrast, not colour, so light-on-dark or low-contrast pairs are often unreadable.
- Leave the human-readable text switched on for retail labels: cashiers need it to type the number by hand when a barcode refuses to scan.
- Give the symbol a quiet zone. Leave empty light-coloured space of at least ten bar widths on the left and right when you place the barcode in your layout.
- EAN-13 and UPC-A expect a real GS1 company prefix. Numbers you invent will scan, but they may clash with a genuine product in a retailer's database.
❓ 常见问题解答
Code 128 is the safest default for internal and logistics labels: it encodes any ASCII character and stays compact. Use EAN-13 (or EAN-8 for small packs) for retail products sold outside North America, UPC-A for the US and Canada, ITF-14 for shipping cartons, Code 39 or Codabar for asset, library and laboratory labels, and Pharmacode for print control in pharmaceutical packaging.
Enter 12 digits for EAN-13, 7 for EAN-8 and 11 for UPC-A. The generator calculates and appends the final check digit for you, so you do not type it yourself. If you paste a complete 13-digit code, the check digit is validated instead.
The barcodes scan perfectly, but retail EAN and UPC numbers have to be bought from GS1 so that the number is registered to your company. A self-invented number may already belong to somebody else's product. For internal stock, warehouse or asset labels no registration is needed.
Use SVG whenever the barcode will be printed or resized: it is a vector, so the bars stay perfectly sharp at any size. PNG is convenient for screens, email and documents that cannot handle vector files.
The usual causes are too little contrast between the bars and the background, a symbol printed too small, a missing quiet zone (empty margin) on either side, or a blurry image from enlarging a PNG. Print the SVG with a wider bar width, keep dark bars on a light background, and leave clear space around the barcode.
No. The barcode is drawn in your browser with JavaScript, so the product codes, batch numbers and reference numbers you type never leave your device. Once the page has loaded, the generator keeps working even without an internet connection.