📦 Barcode Generator
Seven formats — single live preview or batch generation, with built-in thermal-label and A4 sticker print layouts. Runs entirely in your browser.
Example:
{{ sFormatObj.example }}value or value [Tab] name or value [Tab] name [Tab] priceName and price appear on the printed label.
From a Pack of Gum to Every Warehouse on Earth
The first product ever scanned at retail was a pack of Wrigley's gum in an Ohio supermarket in June 1974, carrying the then-new UPC (Universal Product Code). Europe extended the 12-digit UPC into the 13-digit EAN a few years later, and the two remain compatible — a UPC-A is effectively an EAN-13 with a leading zero. Today both are administered globally by GS1, which licenses the company prefixes that make every retail barcode worldwide unique.
The key decision when generating a barcode is whether that global uniqueness matters to you:
- Internal use (SKUs, asset tags, consignment codes) → CODE128. Any ASCII characters, any length, dense, and read by every commodity scanner. You invent your own numbering scheme; no registration needed.
- Retail shelf products → EAN-13/UPC-A with a number issued under your own GS1 company prefix. Inventing your own 13 digits will collide with someone else's product at the POS — retailers will reject it at intake.
- Cartons and pallets → ITF-14, the logistics-level wrapper around an EAN number, with thick bars that survive corrugated cardboard printing.
- Legacy systems → CODE39 (industrial/government/healthcare) and Codabar (libraries, blood banks, FedEx airbills) mostly exist to match installed equipment; don't pick them for new designs.
The Check Digit: 40 Years of Typo Protection
The last digit of every EAN/UPC/ITF code is computed from the others: multiply alternating digits by 1 and 3, sum them, and the check digit is whatever brings the total to a multiple of 10. This modulo-10 scheme catches every single-digit typo and most adjacent-digit swaps before a mislabeled product ever ships.
This tool applies the same logic: enter 12 digits for an EAN-13 (or 7 for EAN-8, 11 for UPC-A, 13 for ITF-14) and the check digit is computed for you; enter the full length and it's verified — a "format rejects this value" error on a full-length code almost always means one digit was transcribed wrong, which is exactly the failure the check digit exists to catch.
CODE128, incidentally, is cleverer than it looks: it encodes in three internal subsets (A/B/C), and subset C packs pairs of digits into single symbols — which is why all-numeric CODE128 barcodes come out surprisingly compact. The JsBarcode engine used here handles subset switching automatically.
Print Quality: What Scanners Actually Need
A laser or camera scanner reads the ratio of bar widths from reflected light, so print quality problems translate directly into read failures:
- Minimum sizes: keep bars at least 8 mm tall and the narrowest bar at least 0.3 mm wide. If a label is too small, shorten the encoded value rather than squeezing the bar width.
- Quiet zones: leave the light margin on both sides intact (the tool's margin setting). Text or box borders crowding the code is a classic silent killer.
- Contrast: dark bars on a light background. Red bars scan poorly under red laser light; avoid colored bars unless you've tested them.
- Thermal printers: in the browser print dialog, set a custom paper size matching your label (e.g. 40×30 mm), margins to zero, and disable headers/footers. The printer driver's paper size must agree, or every label drifts progressively.
- A4 sticker sheets: test-print on plain paper and hold it against the sticker sheet before committing — die-cut positions vary slightly between brands. The "start cell" option lets you resume on a partially used sheet.
- SVG for anything large: vector output scales losslessly; PNG is fine for documents and web pages.
Batch Workflows
- E-commerce sellers: export your product list as CSV (columns: barcode value, name, price), import it here, pick a thermal label size, and print the whole catalog in one pass. Pair with an inexpensive USB scanner for scan-to-ship workflows.
- Asset tagging: equipment, folders, and library books with sequential CODE39/CODE128 IDs; the per-item copies field handles reprinting a single damaged label without redoing the batch.
- Testing scanner integrations: need a pile of valid EAN-13s? Feed any 12-digit values and let the tool append correct check digits — no spreadsheet formulas required.
- Tab-separated quick entry: in the batch textarea, each line is
value [Tab] name [Tab] price; name and price print on the label below the bars.
Frequently Asked Questions
Which format should I default to?
CODE128, unless a retailer or an existing system dictates otherwise. It handles any ASCII content at any length and every modern scanner reads it.
Can I just make up an EAN-13 for my product?
For internal shelf labels, yes — nobody outside your store scans them. For products sold through retail channels, no: the number must come from a GS1-licensed company prefix, or it will collide with another company's product in POS databases.
Does my data leave the browser?
No. Rendering, CSV parsing, and print layout all run client-side — barcode values, product names, and prices are never uploaded.
How should I prepare the CSV?
First three columns: barcode value, name (optional), price (optional). A header row is skipped automatically. Save as CSV UTF-8 from Excel if your labels contain non-ASCII text, or download the sample CSV above and edit it.