Barcode Generator
Generate EAN, UPC, CODE128 and CODE39 barcodes in scanner-safe custom colours and download them as SVG or PNG for labels. Free, in your browser.
Barcode
Preview
Barcodes that scan, in five symbologies
Choose a format, type the value and the barcode renders immediately with its human-readable text underneath. Five symbologies are supported: CODE128 for any printable ASCII, the densest and most widely read; CODE39 for uppercase letters, digits and a few punctuation marks, common on shipping labels and badges; and the retail family EAN-13, UPC-A and EAN-8. The retail formats compute the check digit if you enter the code without it and refuse a code whose check digit is wrong, which catches most typing errors before a label is printed.
Bar width and height are adjustable, and the download comes as an SVG, which scales to any label size without blurring, or a PNG rendered at three times the preview size on a solid background, since scanners need the contrast and a transparent PNG loses it. A print button sends the symbol straight to the printer. The required quiet zone, ten modules of blank space either side, is included in both.
Bars and background can be any colour, from six ready-made presets or your own picks, and every combination is checked as you choose it. Most scanners read with red light, so red, orange and yellow bars vanish and blue or green backgrounds read as black; the page warns about those, about low contrast and about light bars on a dark background, and a Fix colours button moves your choice to the nearest pair that scans.
Encoding is done with small lookup tables written for this page rather than a bundled library, and nothing is sent anywhere. For the retail codes, a barcode that scans is not the same as a registered one: EAN and UPC numbers are issued by GS1, and a code generated here with a made-up number will scan but will not resolve to a product in anyone's database.
Frequently asked questions
Can a barcode be in colour?
Yes, as long as the bars are dark and the background is light under red light, which is what most scanners use. Dark blue, green, brown or purple bars on white or a pale tint work; red, orange or yellow bars and blue or green backgrounds do not. The colour check on this page flags unsafe pairs and can fix them for you.
What is the difference between EAN-13 and UPC-A?
UPC-A is 12 digits and used in North America; EAN-13 is 13 digits and used almost everywhere else. A UPC-A code is the same as an EAN-13 with a leading zero, and most scanners read both.
Why does my printed barcode not scan?
Usually one of: printed too small or below 300 DPI, the white margin either side was cropped, the image was stretched in one direction, or the bars were printed in a light colour. Print the SVG at full size in black on white.
Does CODE39 support lowercase letters?
No. CODE39 encodes A to Z, 0 to 9, space and the characters - . $ / + %. For lowercase or other symbols use CODE128.
Where do I get a real EAN or UPC number for a product?
From GS1, the organisation that allocates company prefixes, via its national member body. Numbers made up here will scan but will not match any product record in a retailer's system.
Can I make a QR code here?
No, this tool only produces one-dimensional barcodes. The QR code generator on this site handles URLs, Wi-Fi credentials and text.