About the Barcode Generator
This barcode generator produces a scannable Code 128, EAN-13, UPC-A or Code 39 barcode from any text or number you enter, rendered as a downloadable image directly in your browser. It is built for the everyday cases that come up around inventory, labelling and internal tracking, and it validates the input against each format's actual rules, catching a wrong digit count before it becomes a barcode that silently fails to scan.
How to use the Barcode Generator
- 1
Type the text or number you want encoded.
- 2
Choose a barcode format — Code 128 for general use, or EAN-13 and UPC-A for retail-style numeric codes.
- 3
Toggle whether to show the human-readable number underneath the bars.
- 4
Download the generated barcode as a PNG image.
What people use it for
Labelling inventory or stock items
Generate Code 128 barcodes for an internal numbering system to speed up stocktaking with a barcode scanner, without needing officially registered retail numbers.
Printing a barcode for a product listing
Turn an already-assigned EAN-13 or UPC-A number into a print-ready barcode image for packaging or a shelf label.
Testing a barcode scanner or point-of-sale system
Generate a handful of valid test barcodes in the format your system expects, useful during development or hardware setup.
Choosing the right format
Code 128 is the most flexible format here, encoding letters, numbers and most punctuation at a comparatively compact width, which makes it a common default for internal logistics and inventory systems that don't need to follow retail standards. EAN-13 and UPC-A are the formats printed on almost every retail product worldwide — UPC-A predominates in the United States and Canada, EAN-13 elsewhere — and both are strictly numeric with a fixed digit count. Code 39 is an older format, still found in some industrial, automotive and government settings, that trades compactness for being easy to print and scan reliably even with older equipment.
Why EAN-13 and UPC-A include a check digit
The final digit in both formats is a checksum, calculated from all the preceding digits using a fixed weighting formula, which a scanner uses to catch a misread digit before it registers the wrong product. Entering 12 digits for EAN-13 or 11 for UPC-A lets this tool calculate that check digit automatically; entering the full digit count including a check digit you already have causes it to be verified rather than recalculated, and a mismatched check digit correctly gets rejected as invalid.
Tips
- For anything sold at retail, only use a UPC or EAN number genuinely assigned to that product by GS1 or an equivalent body — a barcode that scans is not the same as one that is authorised for use.
- Test a printed barcode with an actual scanner or a phone scanning app before a full print run, since print size and contrast affect scan reliability more than the underlying data.
- Code 128 is usually the right default when there is no retail-standard requirement to follow — it fits more data in less space than the older formats.