About Barcode Generator
Generates barcodes in eight formats using the JsBarcode library: CODE128, EAN-13, EAN-8, UPC-A, Code 39, ITF-14, MSI, and Pharmacode. Each format has its own input validation—EAN-13 requires exactly 12–13 digits, UPC needs 11–12, Pharmacode accepts only values from 3 to 131,070. The barcode renders as SVG for crisp display and exports as PNG via canvas conversion. Line color, background color, bar width, height, and font size are all customizable.
- Eight barcode formats: CODE128 (any ASCII), EAN-13, EAN-8, UPC-A, Code 39 (alphanumeric + symbols), ITF-14, MSI, and Pharmacode
- Format-specific validation with regex patterns—entering invalid data shows an error before rendering, not a broken barcode
- Renders as SVG for resolution-independent display; exports as PNG by drawing the SVG onto a canvas element
- Customizable appearance: line color, background color, bar width (1–5), bar height (40–150px), font size, and optional human-readable text below the barcode
- JsBarcode loaded via dynamic import to keep the initial page bundle small
Frequently Asked Questions
- Which format should I use?
- CODE128 for general-purpose internal labels—it encodes any ASCII character compactly. EAN-13 or UPC-A for retail products (EAN in Europe/international, UPC in North America). ITF-14 for shipping cartons. Pharmacode only for pharmaceutical packaging. When in doubt, CODE128.
- Can I scan these with a phone?
- Yes. Download the PNG and print it or display it on screen. Any barcode scanner app (or most phone cameras) will read CODE128, EAN-13, and UPC-A without issues. Less common formats like Pharmacode may require a dedicated industrial scanner.
More Generators Tools
All Generators toolsGenerators
QR Code Generator
Create QR codes for URLs, text, WiFi, and contacts.
Generators
Git Command Generator
Build git commands with a visual interface.
Generators
Open Graph Tag Generator
Generate Open Graph meta tags for social sharing.
Generators
Unit Test Generator
Generate unit test boilerplate for functions.