Barcode Generator
Generate Code 128 and EAN-13 barcodes with SVG / PNG export
Optimized automatically: switches to Code Set C for digit runs of 4+ to keep the barcode compact.
- Code 128 — the most versatile 1D barcode. Encodes all ASCII 32-127. Shipping labels, inventory, internal tracking.
- EAN-13 — the 13-digit retail standard used worldwide for books (ISBN-13), grocery, and general consumer goods.
How to use
- Pick Code 128 or EAN-13
- Enter the content to encode
- Customize colors and dimensions
- Download as SVG or PNG
Use cases
- Shipping labels
- Inventory
- Retail / ISBN
- Asset tags
About the Barcode Generator
Barcodes turn printed data into a machine-readable optical signal. Code 128 is the dominant flexible 1D barcode (used in shipping, warehousing, and IDs); EAN-13 is the global retail standard (groceries, books, pharmacies). This tool implements both encoders per ISO/IEC 15417 (Code 128) and ISO/IEC 15420 (EAN-13), complete with the check-digit algorithm and quiet-zone margin.
Features
- Code 128 — all ASCII 32-127, auto-optimized Code Set C for digit runs
- EAN-13 — 12 or 13 digits, check digit auto-computed
- Custom foreground / background colors
- Adjustable module width and bar height
- SVG export (vector, sharp at any size) and PNG export at 2× resolution
- Human-readable text optional
How it works
- Choose Code 128 (text) or EAN-13 (digits).
- Type the content to encode.
- Customize colors, width, height, and whether to show human-readable text.
- Download the SVG (vector) or PNG (@2× raster).
Frequently asked questions
Which barcode type should I use?
+
Code 128 for internal / shipping / asset barcodes (most flexible — all ASCII). EAN-13 for retail (books = ISBN-13, grocery = GTIN-13).
Why is my barcode not scanning?
+
Print at 100% (never scale down), keep a quiet zone (10× module width) around it, and make sure contrast between fore- and background is high. Avoid stretching: if you must resize, use the SVG and scale proportionally.
Does it support QR codes?
+
No — use our dedicated QR Code Generator. QR is a 2D code and belongs in a separate tool for clarity.
What's the EAN-13 check digit?
+
The 13th digit is a mod-10 weighted checksum of the first 12. If you enter 12 digits, we compute and append it. If you enter 13, we render as-is.
Is Code 128 case-sensitive?
+
Yes — ALL and all are different barcodes. Case matters in Code Set B.