📊 Barcode Generator
Generate barcodes: CODE128, EAN-13, UPC, CODE39, ITF-14. Download as SVG or PNG.
Create scannable barcodes in five industry-standard formats: CODE128 for general use, EAN-13 and UPC-A for retail products, CODE39 for inventory, and ITF-14 for shipping cartons. The barcode renders instantly in the browser using the JsBarcode library with no server uploads. Download the output as an editable SVG or a ready-to-share PNG image.
What Is a Barcode Generator?
Barcode Generator is a browser-based tool that creates 1D (linear) barcodes from text or numeric input. You type the data you want to encode, select a barcode symbology, and the tool produces a scannable barcode image using the JsBarcode encoding library. The output is an SVG graphic that you can download as SVG or PNG. The tool supports five common 1D symbologies: CODE128, EAN-13, UPC-A, CODE39, and ITF-14. All encoding and rendering happens in your browser — your input data is never transmitted to a server.
Barcode Types Supported
| Type | Use Case | Input Rules |
|---|---|---|
| CODE128 | General-purpose: shipping labels, inventory tags, identification badges | Most ASCII characters. Variable length. The library auto-selects the most compact encoding (A, B, or C). |
| EAN-13 | Retail products — the standard barcode on consumer goods worldwide | Exactly 12 or 13 digits. The check digit is computed automatically from the first 12. |
| UPC-A | North American retail products | 11 or 12 digits. The check digit is computed automatically from the first 11. |
| CODE39 | Logistics, automotive, military, and healthcare labeling | Uppercase A-Z, digits 0-9, space, and -.$/+% symbols. Variable length. No check digit by default. |
| ITF-14 | Shipping cartons and wholesale packaging (GTIN-14) | Exactly 14 digits. Used for outer cases and pallet-level identification. |
Note: This tool generates 1D (linear) barcodes only. It does not generate 2D codes such as QR codes, Data Matrix, or PDF417. For QR codes, see the QR Code Generator.
📋 When to Use the Barcode Generator
The Barcode Generator is built for practical barcode creation tasks. Use it when you need a CODE128 barcode for a shipping label, an EAN-13 for a product mockup, a UPC-A for a retail packaging design, a CODE39 for an inventory tag, or an ITF-14 for a carton label. Because the tool uses the JsBarcode library and runs entirely in your browser, there is no server round-trip — your barcode data is processed locally and never uploaded. This makes it suitable for product development workflows, logistics planning, packaging design reviews, and any situation where you need a standard-compliant barcode image without installing desktop software.
⚙️ How the Barcode Generator Works
The Barcode Generator uses the open-source JsBarcode library (v3.11.6, MIT license) loaded from CDN. Here is what happens when you click Generate:
- Input validation: The library checks your input against the selected format's rules — digit counts for EAN-13 and UPC-A, character set for CODE39, and variable-length handling for CODE128.
- Check digit computation: For EAN-13, UPC-A, CODE128, and ITF-14, the library automatically calculates the required check digit using the symbology's modulo algorithm. CODE39 uses an optional check digit, which is not computed by default.
- Bar/space pattern generation: The library translates each character into the correct sequence of bars and spaces according to the symbology specification, including start/stop characters and quiet zone indicators.
- SVG rendering: The barcode is drawn as an SVG element directly in the page, rendered at the dimensions you select. SVG preserves sharp edges at any scale — ideal for print.
- Download: You can download the barcode as SVG (editable vector) or PNG (raster image). PNG conversion uses the browser's Canvas API — still entirely local, no server involved.
The JsBarcode library loads once from jsDelivr CDN and then runs entirely in your browser. No barcode data is sent to any server during generation, download, or at any other time.
How to Use the Barcode Generator
- Enter your barcode data (numbers or text) into the input field.
- Choose a barcode format: CODE128 (general), EAN-13 (retail), UPC-A, CODE39, or ITF-14.
- Click Generate to create your barcode. The preview updates instantly.
- Download the barcode as SVG (for editing) or PNG (for sharing).
Frequently Asked Questions
What is the difference between CODE128 and EAN-13?
CODE128 is a general-purpose barcode that can encode letters, numbers, and special characters at variable lengths. EAN-13 is a retail-specific symbology limited to exactly 12 or 13 digits, used on consumer products worldwide. If you need a barcode for a shipping label or inventory tag, use CODE128. If you need a barcode for a product that will be scanned at retail checkout, use EAN-13.
Does this create an official product barcode I can use in stores?
No. This tool produces a technically valid EAN-13 or UPC-A barcode image, but the number encoded in it must be assigned by GS1 (or your regional numbering authority) to be recognized in retail systems. If you enter a valid GS1-issued number, the generated barcode will be scannable — but the tool itself does not register anything in any product database.
Why does my barcode need a quiet zone?
The quiet zone is the blank margin on both sides of a barcode. Scanners use it to identify where the barcode begins and ends. Without adequate quiet zone — typically 10x the narrowest bar width for most 1D symbologies — a scanner may fail to read the barcode or misread it. The JsBarcode library includes quiet zone in the generated SVG output by default.
Can scanners read a barcode displayed on a screen?
Many modern scanners (especially camera-based imagers) can read barcodes from LCD and OLED screens. However, laser scanners may struggle with screen glare, and low screen brightness or a damaged display can reduce readability. For reliable scanning from a screen, maximize brightness and avoid reflections.
Can I download the barcode for printing?
Yes. Click the Download button and select SVG for a scalable vector file (best for editing in design software or resizing without quality loss) or PNG for a raster image (best for pasting into documents and emails). Both formats download immediately to your device.
Is my barcode data uploaded to a server?
No. All barcode encoding and rendering happens inside your browser using the JsBarcode JavaScript library. Your input text or numbers never leave your device. The tool loads the JsBarcode library from jsDelivr CDN once, and from that point all processing is local.
Limitations
- Not a product registry: Generating an EAN-13 or UPC-A barcode does not register it in any product database (such as GS1). You need a GS1 company prefix to create official retail barcodes.
- Scanner readability varies: A barcode that scans from a screen may not scan from paper. Print quality, ink contrast, quiet zone width, and physical size all affect scanner performance. Test with your target scanner before production use.
- Format selection matters: Choosing the wrong symbology for your use case (e.g., CODE128 for a retail product) will produce a valid but unscannable-at-retail barcode.
- Minimum size constraints: Very small barcodes may be unreadable by standard scanners. The tool renders at a fixed module width of 2px and height of 100px, which provides adequate scanability for most use cases.
- Symbology support is limited to five types: EAN-8, UPC-E, GS1-128, Data Matrix, PDF417, and other symbologies are not supported by this tool.
Privacy & Data Handling
The Barcode Generator processes all data in your browser using client-side JavaScript. The JsBarcode library, once loaded from jsDelivr CDN, runs locally on your device. The barcode data you type into the input field is never transmitted to ToolStand servers, jsDelivr, or any third party. The tool uses standard web analytics (page view tracking) for site measurement, but the content of your barcode input is not captured, stored, or sent to any analytics service. SVG-to-PNG conversion uses the browser's Canvas API — no server-side rendering is involved.