How to use the barcode generator
- Choose the Barcode type.
- Enter the Value to encode. For EAN, UPC and ITF-14 you can leave out the last digit: the check digit is calculated for you. If you type it, it is verified.
- Set the Bar width (the width of the thinnest bar, 1 to 4 px) and the Height of the bars (20 to 200 px), and choose whether the value is printed as text under the bars.
- Press Generate. After that the barcode updates as you type. Download it as SVG for print and design work, or as PNG for documents and websites.
Everything is created in your browser; the values you enter are not sent to our server.
Which barcode type should I use?
- EAN-13 is the standard retail product code in most of the world. UPC-A is its 12-digit North American counterpart, and EAN-8 is a short version for small packages.
- ITF-14 marks shipping cartons and cases that contain retail products.
- Code 128 encodes letters, digits and symbols compactly. It is common for shipping labels, inventory and asset tags.
- Code 39 is an older, simple format that uses digits, capital letters and a few symbols. Many industrial and ID systems still use it.
To sell products in stores, EAN and UPC numbers must be licensed from GS1. This tool draws the barcode for a number you already have; it does not issue numbers.
How the check digit works
EAN-13, EAN-8, UPC-A and ITF-14 end with a check digit that lets scanners catch misread codes. Starting from the rightmost digit before the check digit, multiply the digits alternately by 3 and 1 and add the results. The check digit is the amount needed to reach the next multiple of 10.
Worked example
Take the EAN-13 number 590123412345. From right to left the digits are 5, 4, 3, 2, 1, 4, 3, 2, 1, 0, 9, 5. Multiplying by 3, 1, 3, 1 and so on gives 15 + 4 + 9 + 2 + 3 + 4 + 9 + 2 + 3 + 0 + 27 + 5 = 83. The next multiple of 10 is 90, so the check digit is 7 and the full code is 5901234123457. If you type 5901234123456 instead, the tool tells you the last digit should be 7.
Good to know
- Print barcodes in black on a white background and keep the white margin around them; scanners need this quiet zone.
- Test a printed barcode with a scanner or a phone app before printing in large numbers.
- SVG stays sharp at any size. The PNG is saved at twice the on-screen size.
- Code 128 here accepts basic Latin (ASCII) characters only; accented letters cannot be encoded.
- Code 39 has no lowercase letters, so lowercase input is changed to capitals.