Make a barcode for a product, a label or a document
Barcodes turn up everywhere in a small business: product labels, stock and asset tags, library cards, tickets, shipping labels and invoices. This generator makes clean, scannable barcodes in the four most common formats, works out the check digit for you, and saves them as PNG for documents or SVG for printing at any size. You can also make a whole list at once, such as a barcode for every product code in a spreadsheet column.
Which type do I need?
- Code 128 holds letters, numbers and punctuation, so it is the usual choice for your own codes: stock numbers, asset tags, order numbers, membership numbers. Long runs of digits are packed two to a symbol, so number-heavy codes stay short.
- EAN-13 is the 13-digit barcode on retail products almost everywhere outside North America.
- UPC-A is the 12-digit retail barcode used in the US and Canada.
- EAN-8 is a short retail code for small packs with little room.
Important: to sell in shops, a retail EAN or UPC number has to be licensed to your company by GS1, the organisation that runs the numbering system. Making up a number creates a valid-looking barcode that may clash with another company's product. For your own internal use, Code 128 needs no licence.
How to use it
- Choose the type.
- Type the value. For EAN and UPC you can leave out the last digit and it is worked out for you; if you type it, it is checked.
- Adjust the bar width and height if needed. Wider bars scan more easily from a distance or with older scanners.
- Download the PNG or SVG, or open "Make a whole list" to download a zip with one image per line.
Tips for barcodes that scan
- Leave the white space on both sides. Scanners need a quiet zone; the images include it, so do not crop it off.
- Print dark bars on a light background, ideally black on white. Red bars cannot be read by most scanners.
- Do not stretch the image unevenly. Scale width and height together, or change the bar width here.
- Test before printing a thousand labels: most phones can read barcodes with the camera or a free scanner app.
How this tool was tested
Before publishing, I ran 30 automated checks on the finished page in Microsoft Edge, which is built on Chromium like Chrome. Last full run: 15 November 2026.
- Checked against another barcode library: the bars for 300 random texts in Code 128 set B, 300 numbers in set C, 300 EAN-13, 200 UPC-A and 200 EAN-8 numbers were compared with JsBarcode, an independent open-source library loaded only for the test, and were identical in every case.
- Automatic Code 128: 400 random codes that switch between letters and packed digits were decoded back to text with a decoder written for the test, and every one came back exactly, with a valid check symbol, never longer than letters-only encoding.
- Check digits: published EAN-13, UPC-A, EAN-8 and ISBN examples; a wrong check digit is caught and the right one named.
- Using the tool: each type, the check digit message, the SVG and PNG downloads (PNG at twice the size), bar width and height, hiding the text, and a list downloaded as a zip with bad lines skipped and repeated values kept apart.
What the tests did not cover: The barcodes were not scanned with a physical scanner. Safari and Firefox were not tested. Something not working? Tell me on the contact page.
FAQ
Is this free for commercial use?
Yes. The barcodes you make are yours to use, with no watermark. Retail numbers still need a GS1 licence, as above.
Can I make QR codes here?
QR codes have their own tool: the QR code generator.
How do I print them on labels?
Download the zip of PNGs and insert them in your label template, or put the codes in a spreadsheet and use the label maker for text labels.