Barcode Generator
Create a barcode in Code 128, EAN-13, UPC-A or Code 39. Check digits are calculated for you, and the result downloads as a crisp SVG or a PNG.
Letters, digits, spaces and common symbols (printable ASCII). Long digit runs are packed in pairs.
Barcodes are drawn in your browser. Test-scan before printing in bulk. Real EAN and UPC product numbers are assigned by GS1; making up a number does not register it.
About the Barcode Generator
This generator draws one-dimensional barcodes, the rows of bars read by scanners. It supports four common symbologies, calculates check digits for you and exports either a scalable SVG or a PNG image. Everything is computed in your browser; the text you enter never leaves your device.
The four types
- Code 128 encodes letters, digits, spaces and common symbols. It switches automatically between code set B for text and code set C, which packs two digits into each symbol, so long numbers stay short. A modulo-103 check character is added.
- EAN-13 is the 13-digit retail product number used in most of the world. Enter 12 digits and the check digit is added, or all 13 and the tool confirms it is correct.
- UPC-A is the 12-digit retail number used in the United States and Canada. It is an EAN-13 that starts with zero.
- Code 39 encodes capital letters, digits, space and
- . $ / + %. It is older and wider but some equipment still requires it.
How the check digit works
For EAN-13 and UPC-A, digits are weighted 3 and 1 alternately, starting with 3 at the rightmost digit before the check digit. The check digit tops the total up to the next multiple of ten. For 400638133393 the weighted total is 89, so the check digit is 1 and the full number is 4006381333931.
Worked example
Choose UPC-A and type 03600029145. The tool adds the check digit 2 and shows 036000291452 under the bars, with the outer digits printed beside them. Download the SVG for a label design or the PNG for a document.
Good to know
- Leave the white margin around the bars. Scanners need this quiet zone.
- Keep dark bars on a light background; inverted or pale colours often fail to scan.
- Retail EAN and UPC numbers must be licensed from GS1. Generating a picture does not register a number.
- For links and longer text, a QR code holds far more data.
How to use Barcode Generator
- Choose the barcode type.
- Type the text or number; EAN and UPC check digits are added or verified.
- Adjust bar width, height, colours and the text line, then download SVG or PNG.
Privacy: how it works
The barcode is drawn in your browser. Nothing you type is sent to a server.
Frequently asked questions
Which barcode type should I use?
EAN-13 (or UPC-A in North America) for retail products with a GS1 number. Code 128 for shipping labels, stock codes and anything with letters. Code 39 when older equipment requires it.
Can I make up an EAN or UPC number?
You can generate the image, but products sold in shops need a number licensed from GS1. A made-up number may clash with another product.
Should I download SVG or PNG?
SVG scales to any size without blurring, so it suits print and design tools. PNG is a fixed-size image for documents and labels; pick a larger bar width for higher resolution.