Free Barcode Generator – Code 128, EAN-13 & UPC
Generate standard Code 128, EAN-13, and UPC barcodes as SVG / Canvas data.
Related tools
QR Code Generator
Generate customizable QR codes from text, URLs, WiFi, email, SMS, phone, and contact (vCard) data, with logo embedding and PNG/SVG export.
Placeholder SVG Image Generator
Generate clean SVG placeholder images with custom dimensions, background color, and text.
Favicon Generator & HTML Header Tags
Generate standard favicon HTML link tags for apple-touch-icon, manifest, and SVG icons.
CSS / SVG Gradient Image Generator
Generate downloadable SVG gradient background images with custom color stops.
Image Format Helper (PNG / JPEG / WebP / SVG)
Helper tool for image format MIME types, dimensions, and header specifications.
This barcode generator creates standard Code 128, EAN-13, and UPC barcodes directly in your browser, ready to export as SVG or use as canvas image data. It's built for small business owners labeling retail products, warehouse teams generating internal tracking codes, and developers testing barcode scanning apps who need valid sample codes on demand. Type in your product number, ISBN, or custom data string, choose the barcode symbology, and the tool renders a scannable barcode instantly with correct check-digit calculation for EAN-13 and UPC formats. Because everything runs client-side, there's no need to upload data to a third-party service — useful when generating codes tied to unreleased products or internal SKUs you'd rather not send anywhere. You get a clean, print-ready SVG that scales without pixelation, so barcodes stay crisp on packaging, labels, and shelf tags at any size. There's no signup, no per-code fee, and no limit on how many barcodes you generate. Scroll down to enter your data, pick a barcode type, and download your barcode right away.
Features
- Generate Code 128, EAN-13, and UPC-A barcodes
- Automatic check-digit calculation for EAN-13/UPC
- SVG export for crisp, scalable printing
- Canvas/PNG export option for digital use
- Real-time barcode preview as you type
- Input validation to catch invalid barcode data
- Adjustable bar width and height
- No signup, no per-code limits
Why use this barcode generator (code 128 / ean / upc)?
- Generates barcodes instantly with no processing delay
- Fully private — product data never leaves your browser
- Accurate check-digit math for retail-compliant codes
- Simple type-and-generate workflow
- Completely free with unlimited barcodes
Frequently asked questions
What's the difference between EAN-13 and UPC barcodes?
EAN-13 is the 13-digit international retail standard, while UPC-A is the 12-digit North American standard — both encode product identifiers with a check digit.
Does this tool calculate the check digit automatically?
Yes, for EAN-13 and UPC formats the check digit is calculated automatically from the preceding digits.
What is Code 128 used for?
Code 128 is a flexible, high-density barcode that can encode any ASCII character, commonly used for shipping labels and internal inventory tracking.
Can I use these barcodes for real retail products?
You can generate technically valid EAN-13/UPC barcodes, but official retail use requires a registered GS1 company prefix to ensure your number is globally unique.
Should I export as SVG or PNG for printing?
SVG is recommended for printing since it stays sharp at any size, while PNG works fine for on-screen or digital use.
Is my barcode data sent to a server?
No, barcodes are rendered entirely in your browser using JavaScript, so your data is never transmitted.
Why did I get an error generating my barcode?
This usually means the input has the wrong number of digits for the selected format — EAN-13 needs 12-13 digits and UPC-A needs 11-12 digits.