How to use it
- Choose the Barcode type. For a product sold in shops choose EAN-13, or UPC-A in North America.
- Type the Number or text without the check digit, or the whole code. The status line says whether the check digit was added or checked.
- Set the Bar width and Bar height, and tick the number under the bars if you want it shown.
- Click Download PNG or Download SVG for one barcode, or type one value per line in the batch box and click Make PNG files (ZIP).
How the check digit is worked out
EAN-13, EAN-8, UPC-A and ITF-14 end with a check digit, calculated with the modulo 10 method that GS1 uses for its numbers. Counting from the right, the digits without the check digit are weighted 3, 1, 3, 1 and so on. The weighted sum is taken modulo 10 and subtracted from 10, and a result of 10 becomes 0.
For 400638133393 the weighted sum is 89, so the check digit is 1. Type the number without its check digit and the tool adds it. Type the whole code and the tool checks it, and refuses it when the last digit is wrong, because a scanner would read a different product.
Choosing a barcode type
- EAN-13: the 13-digit barcode on most retail products around the world.
- UPC-A: the 12-digit barcode used on products sold in North America.
- EAN-8: a short 8-digit code for very small packages.
- ITF-14: a 14-digit code for outer shipping cartons, in the GTIN-14 format.
- Code 128: any printable letters, digits and symbols, used in logistics and on labels. The drawing library works out its internal check character, so you only type the text.
- Code 39: capitals, digits and a few symbols. It is older and longer than Code 128, but still common in some industries.
Printing and scanning
Keep a clear, light margin around the bars (the quiet zone) so that a scanner can find the code. The narrowest bar must not be thinner than your printer can reproduce. Black bars on a white or light background scan best.
Use the SVG file for print: it stays sharp at any size. A PNG made with a bar width of 2 pixels or more also works when it is printed at 100 %.
Example: a retail product
Type 400638133393 with the barcode type EAN-13. The tool adds the check digit 1, so the code is 4006381333931, and its digits are printed under the bars.
Choose Download PNG to save one barcode, or type several product numbers into the batch box and click Make PNG files (ZIP) to get one PNG per product in a single file.
Frequently asked questions
Does the tool add the check digit or check it?
Both, depending on what you type. A number without its last digit gets the check digit added. A whole code is checked, and if its last digit is wrong the tool refuses it, so no wrong barcode is made.
Are the numbers I type sent to a server?
No. The bars are drawn in your browser with the JsBarcode library, and the PNG, SVG and ZIP files are made on your own device. What you type is not uploaded or stored.
Can I put these barcodes on products I sell?
A barcode identifies a product only when its number is yours. GS1 member organisations allocate company prefixes, and a copied or made-up number can clash with another product in shops. Get your numbers from GS1 or your national GS1 member organisation.
Why does my printed barcode fail to scan?
The usual causes are bars that are too thin, a low-contrast colour, or no clear margin around the bars. Print the SVG file at a size where the bars stay sharp, and keep the margin that the tool adds.
What is the difference between EAN-13 and UPC-A?
UPC-A has 12 digits and is used mostly in North America, while EAN-13 has 13. A UPC-A code becomes an EAN-13 code when a zero is put in front of it, and most scanners read both.
Can Code 39 hold lowercase letters?
No. Code 39 has capitals, digits and a few symbols only, so the tool turns letters into capitals. Use Code 128 when the text needs lowercase letters.
Sources
- GS1: check digit calculator and the modulo 10 check digit method
- GS1: barcode standards for products and shipping
- JsBarcode: the open-source barcode library this tool uses (MIT licence)
Figures and text last checked on Tuesday, November 10, 2026.