Barcode generator
Barcode generator is a browser-based tool that produces Code 128, EAN-13, and UPC-A barcodes. It calculates EAN and UPC check digits automatically, renders to scalable SVG or 2x PNG, and downloads either format with one click. The tool runs in your browser.
FORMAT
0 chars
Barcodes generated locally using JsBarcode. All processing runs in your browser.
Dedicated pages
Format-specific guides with FAQs about each barcode standard.
Code 128 Barcode Generator
Generate Code 128 barcodes from any text or number. Download as SVG or PNG. Free, runs in your browser. All processing runs in your browser.
EAN-13 Barcode Generator
Generate EAN-13 barcodes for retail products. Enter 12 digits, the check digit is calculated automatically. Download as SVG or PNG. All processing runs in your browser.
UPC-A Barcode Generator
Generate UPC-A barcodes for US retail products. Enter 11 digits, the check digit is calculated automatically. Download as SVG or PNG. All processing runs in your browser.
How to generate a barcode
- Choose the barcode format. Code 128 for any text, EAN-13 or UPC-A for product codes.
- Type your data into the input field (EAN-13 requires 12 digits, UPC-A requires 11 digits).
- The barcode renders as an SVG in your browser instantly.
- Click "Download SVG" or "Download PNG" to save it.
Common uses
- Generating Code 128 barcodes for internal product tracking or inventory systems, paired with unique IDs for each item
- Creating EAN-13 or UPC barcodes for retail product packaging or pricing labels
- Producing barcodes for event tickets, library systems, or asset tags — use a QR code generator for URLs and digital content instead
Technical specification
- Algorithm or formula: Format-specific encoding (Code 128, EAN-13, UPC-A). EAN-13 and UPC-A check digits are computed in-tool from the GS1 modulo-10 weighted-sum rule (alternating 1 and 3 weights).
- Browser API or library: JsBarcode 3.12 (lazy-loaded from npm), drawing into an inline SVG element. PNG export rasterises the SVG through the Canvas API.
- Input limits: EAN-13 expects 12 digits, UPC-A expects 11 digits (the 13th and 12th check digits are added automatically). Code 128 accepts any printable ASCII text.
- Output: SVG (vector, .svg) or PNG (raster at 2x device resolution, .png).
- Known limitations: Only EAN-13, UPC-A, and Code 128 are exposed. Code 39, ITF, and DataMatrix are not included. Use a QR code for URL or long-text payloads.
Frequently asked questions
- Is my data sent to a server?
- All processing runs in your browser using JsBarcode. No data is sent to our servers.
- What barcode formats are supported?
- The tool supports Code 128 (general purpose, any text), EAN-13 (13-digit product codes), and UPC-A (12-digit North American product codes). Code 128 is the most versatile.
- Do EAN-13 and UPC barcodes need a check digit?
- You enter 12 digits for EAN-13 and 11 digits for UPC-A. The tool automatically calculates and appends the check digit.
- What is the difference between SVG and PNG download?
- SVG is vector format, infinitely scalable and ideal for print. PNG is raster at 2x resolution, suitable for on-screen use. Use SVG for physical labels and packaging.
Reviewed and tested May 26, 2026.