About this tool
This barcode generator creates Code 128, Code 39, EAN-13 and UPC-A barcodes and lets you download them as PNG images. Type your value, pick a type, and the barcode appears immediately. For EAN and UPC it works out the check digit for you and validates one you type. It runs in your browser and nothing is uploaded.
How to use it
- Choose the barcode type that your scanner, shop or system requires.
- Type the value. A hint under the type tells you what is allowed.
- Adjust the bar width and height, and choose whether to print the value below.
- Press Download PNG to save the barcode.
Which barcode type should you pick?
- Code 128: the flexible choice for text and numbers, used for shipping labels, inventory and asset tags. It handles upper and lower case letters and symbols.
- Code 39: an older, simple format using capital letters, digits and a few symbols, common in industry, libraries and ID badges.
- EAN-13: the 13-digit product barcode used on retail items worldwide.
- UPC-A: the 12-digit product barcode used in the US and Canada. It is the same as an EAN-13 with a leading zero.
How the check digit works
EAN-13 and UPC-A end with a check digit that scanners use to catch misreads. Starting from the left, add the digits in odd positions, add three times the digits in even positions, and the check digit is whatever brings the total up to the next multiple of 10. Enter the first 12 digits (11 for UPC-A) and the tool adds the check digit for you.
Retail barcodes need registered numbers
A barcode image is only a way of showing a number. For products sold in shops, the numbers must come from GS1, the organisation that issues company prefixes, because the prefix identifies you as the owner. Making an EAN or UPC with an invented number may work on your own shelves but will clash with real products and is not accepted by major retailers or marketplaces. For internal stock, shipping and asset labels, Code 128 with your own numbering is the usual choice.
Printing tips
Print at a good resolution with dark bars on a white background, and leave a blank margin (the quiet zone) on both sides. This tool adds one. Do not stretch the image in only one direction, and test with a real scanner before printing a large batch. A bar width of 2 to 3 pixels per module suits most labels.
Things to watch out for
Code 39 cannot encode lowercase letters, so the tool converts them to capitals. Code 128 here encodes printable ASCII characters. Very long values make wide barcodes that are hard to scan, so keep them short. If you need a square code that holds links or lots of data, use the QR code generator.
Frequently asked questions
Code 128 is denser and can encode any printable ASCII character, so it makes shorter barcodes. Code 39 is older, uses capital letters, digits and a few symbols, and is common on ID badges and industrial labels.
Choose the type, enter the first 12 digits (11 for UPC-A) and the tool adds the check digit. For retail products the number must come from GS1.
They are scannable, but retailers and online marketplaces require numbers issued by GS1 for products. For internal inventory, shipping and asset labels you can use Code 128 with your own numbers.