barcode-generator
A barcode encodes data as a pattern of bars (1D) or squares (2D / QR) that machines can read optically. Common formats: Code 128 (general-purpose alphanumeric), EAN-13 (retail products, 13 digits), UPC-A (US retail, 12 digits), QR codes (any data including URLs, up to ~3KB). The ZTools Barcode Generator runs in the browser via JsBarcode + qrcode-generator libraries, supports 10+ formats, and outputs SVG (vector, scalable) or PNG. Useful for inventory, retail, ticketing, and asset tracking.
Use casesβ
Print product barcodesβ
Small business; need EAN-13 codes for products. Generator produces print-ready SVG with check digit.
Track assets with internal codesβ
Code 128 for inventory: any alphanumeric ID. Print on labels, scan with phone.
Generate QR codes for URLsβ
Restaurant menu QR pointing to a URL. Generator handles encoding + error correction.
Event ticketsβ
Code 128 with ticket ID. Scanner at door verifies validity.
How it worksβ
- Pick format β Code 128, Code 39, EAN-13, EAN-8, UPC-A, UPC-E, ITF-14, MSI, Pharmacode, Codabar, QR.
- Type data β Format-specific validation β EAN-13 needs 12 digits + check, Code 128 accepts almost anything.
- Configure β Width, height, margin, foreground / background colors, optional human-readable text below code.
- Save β SVG (vector) or PNG (raster).
Examplesβ
Input: Code 128, "INV-2026-001"
Output: A bar pattern encoding the alphanumeric value. Decodes back to "INV-2026-001".
Input: EAN-13, "123456789012"
Output: Tool computes check digit (8) and produces the 13-digit barcode "1234567890128".
Input: QR code, URL https://example.com
Output: Square QR pattern. Phones decode in <1 second to the URL.
Frequently asked questionsβ
Which format for retail?
EAN-13 (worldwide) or UPC-A (US/Canada). Both are GTIN-12/13 β register with GS1 for unique manufacturer codes.
What if my data has special chars?
Code 128 handles alphanumeric + most ASCII. QR codes handle anything (Unicode supported).
Will scanners read my code?
Generated codes follow the format spec. Test with a scanner before printing 1,000 labels β printer DPI / contrast matters.
Privacy?
All generation in browser.
Tipsβ
- For retail, use registered GS1 codes β random digits look like barcodes but won't scan in retail systems.
- For QR codes, use error correction level Q or H β scanning still works with up to 25-30% damage.
- For asset tracking, Code 128 supports alphanumeric β easier to type into systems than digit-only formats.
- Always test print at production size β too small can't be scanned reliably.
Try it nowβ
The full barcode-generator runs in your browser at https://ztools.zaions.com/barcode-generator β no signup, no upload, no data leaves your device.
Last updated: 2026-05-06 Β· Author: Ahsan Mahmood Β· Edit this page on GitHub