About Barcode Generator
Choose a barcode type, type what it should hold and download it as a PNG image or a sharp SVG for print. Code 128 takes any plain text, such as order numbers, shipping references and asset tags. Code 39 takes capitals and digits, as many older scanners expect. EAN-13, EAN-8 and UPC-A are the retail product codes.
For the retail codes, type the number without its last digit and the check digit is worked out for you; type the full number and it is checked. Bar width, height, quiet zone, the text underneath and the colors are all adjustable, with warnings when a choice would make the code hard to scan.
How it works
- The bar pattern is computed by the open-source jsbarcode encoder in your browser, then drawn by this page onto a canvas for the PNG and written out as rectangles for the SVG.
- EAN-13, EAN-8 and UPC-A share one check-digit rule: alternate digits are weighted 3 and 1 from the right, and the check digit brings the total up to a multiple of ten.
- Code 128 switches between its character sets automatically, so long runs of digits are packed two to a symbol and the barcode stays short.
- Sizes are whole pixels, so every bar lands exactly on the pixel grid and edges stay crisp.
Questions
Can I use these barcodes on products I sell in shops?
The barcode will scan, but retailers only accept EAN and UPC numbers that are registered to your company with GS1. This tool draws the number you give it; it does not issue numbers.
Which type should I choose?
For your own labels, stock and shipping references, use Code 128: it holds letters, digits and punctuation and is compact. Use EAN-13 or UPC-A only for registered retail product numbers, and Code 39 when an older system requires it.
What can each type hold?
Code 128 takes up to 80 printable plain ASCII characters, Code 39 up to 80 capitals, digits, spaces and - . $ / + %, and the retail codes their fixed number of digits. Accented letters and emoji cannot be encoded in these formats.
PNG or SVG?
SVG stays sharp at any size and suits print and design software. PNG suits documents and web pages; download it at the bar width you need rather than scaling it up later, which blurs the bars.
Everything you enter here is processed in this browser tab. Nothing is uploaded, logged or shared. How privacy works here.