Type the first 12 digits and the 13th is added for you. Paste a full number and a wrong last digit is flagged and replaced. Save the barcode as SVG or PNG, or print it on label sheets.
This tool runs entirely in your browser. What you enter is never sent anywhere.Your input is never sent anywhere.
DetailsNumbers or text, one per line
5 901234 123457
| Digit | 5 | 9 | 0 | 1 | 2 | 3 | 4 | 1 | 2 | 3 | 4 | 5 | 7 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Weight | ×1 | ×3 | ×1 | ×3 | ×1 | ×3 | ×1 | ×3 | ×1 | ×3 | ×1 | ×3 | |
| Product | 5 | 27 | 0 | 3 | 2 | 9 | 4 | 3 | 2 | 9 | 4 | 15 |
Sum of products: 83. Next multiple of 10: 90. Check digit: 90 − 83 = 7.
Barcode settings
EAN-13 check digit calculator: 12 digits in, 13 out
The EAN-13 check digit is the 13th and last digit of the number, worked out from the first 12. Type those 12 digits and the calculator adds it: 590123412345 gives check digit 7, so the full number is 5901234123457.
Paste a full 13-digit number and the last digit is recalculated. If it matches, the number is accepted. If not, the last digit is replaced with the correct one and a note shows the old and new digits. Spaces and hyphens in the number are ignored.
Switch to UPC-A for 11- or 12-digit numbers used in the US and Canada, EAN-8 for 7- or 8-digit short numbers, or Code 128 for SKUs and asset tags that contain letters. Enter one number per line to work through a list, then save a barcode as SVG or PNG or print every barcode on a label sheet.
Typical jobs: check a list, label stock, print a sheet
Add or verify the check digit on a list of numbers
Paste one number per line. Each line shows whether the check digit was added, matched, or corrected, so you can catch typos before you upload a product list. Copy all numbers returns the full numbers with their check digits.
Label shelves, bins, and stock with internal-use numbers
For items that stay inside your store, stockroom, or company, Generate internal-use code adds a number from a restricted-circulation range with its check digit already included.
Print barcode labels on Avery sheets
Pick Avery 5160, 5161, 5163, or 5167, set the copies per barcode, and print on US Letter paper. Turn on Print label outlines to test the layout on plain paper first.
Export a barcode image for a design file or document
Download SVG to place in a packaging or label design, or Download PNG for a document or slide. Both include the white margins scanners need.
Calculate the 13th digit and save the barcode
- Select EAN-13, UPC-A, EAN-8, or Code 128.
- Type or paste the number in the box, with one number per line for a list. For EAN-13, enter the first 12 digits.
- Read the full number and barcode in the preview. A short number gets its check digit added. A wrong last digit is replaced and a note appears.
- Open Check digit math to see each digit, its weight, and the sum behind the result.
- Select Download SVG or Download PNG. To print, open Print on label sheets, choose a sheet, and select Print labels.
Note: Spaces, hyphens, and other non-digit characters are ignored in the EAN and UPC formats. With several lines, select a number under the preview to show its barcode. The SVG and PNG downloads use that barcode, while Copy all numbers and printing use every usable line.
Before you print or upload
- A valid check digit shows that the number is consistent, not that it belongs to your business. Retail and marketplace listings generally need GTINs issued by GS1.
- Spreadsheets often drop leading zeros. In UPC-A mode, 11 digits are treated as a base number and get a new check digit, so a UPC-A that lost its leading 0 comes out wrong. The same applies to 12 digits in EAN-13 mode. Add the zero back first.
- Code 128 accepts up to 48 characters: letters, numbers, spaces, and standard keyboard symbols. Accented letters and emoji are rejected.
- The SVG file holds the bars and white margins only. The PNG also draws the number under the bars when Show numbers under bars is on.
- Label layouts assume US Letter paper (8.5 × 11 in). In the print dialog, set paper size to Letter, margins to None, and scale to 100%.
- Scan a printed sample with the scanner or phone app you will use before you print a full sheet. Very small or blurry prints are a common reason a barcode will not read.
UPC-A vs EAN-13 vs EAN-8 vs Code 128
A UPC-A number is an EAN-13 number with a leading 0, so the two share one check digit formula. Pick the format that matches the number you already have or the system that will scan it.
| Format | Digits | Check digit weights (left to right) | Typically used for |
|---|---|---|---|
| EAN-13 | 13 (12 + check digit) | 1, 3, 1, 3 ... | Retail products worldwide and ISBN-13 books |
| UPC-A | 12 (11 + check digit) | 3, 1, 3, 1 ... | Retail products in the US and Canada |
| EAN-8 | 8 (7 + check digit) | 3, 1, 3, 1 ... | Small packages with no room for 13 digits |
| Code 128 | Up to 48 characters | Checksum added automatically | SKUs, asset tags, order and shipment numbers |
Number ranges worth knowing (the first three digits of an EAN-13, or a 0 plus the first two digits of a UPC-A):
- 020-029, 040-049, 200-299: GS1 sets these aside for restricted circulation, meaning use inside one store or one company.
- 978 and 979: books (ISBN-13).
- Everything else: issued through GS1 member organizations to companies that hold a GS1 company prefix.
Numbers made here follow the EAN and UPC bar patterns, but a valid check digit does not mean the number is registered to anyone. To sell through other retailers, use GTINs issued by GS1.
How the check digit is calculated (worked example)
The same rule covers EAN-13, UPC-A, and EAN-8: multiply each digit by a weight, add the products, and find what is needed to reach the next multiple of 10.
Step by step: 590123412345 becomes 5901234123457
Multiply the digits from the left by 1, 3, 1, 3, and so on: 5×1, 9×3, 0×1, 1×3, 2×1, 3×3, 4×1, 1×3, 2×1, 3×3, 4×1, 5×3. The products add up to 83. The next multiple of 10 is 90, and 90 − 83 = 7. The check digit is 7, so the full number is 5901234123457. If the sum already ends in 0, the check digit is 0.
UPC-A: same formula, different starting weight
A UPC-A has 11 data digits plus the check digit, and the weights start with 3: 3, 1, 3, 1, and so on. For 01234567890 the sum is 85, so the check digit is 5 and the UPC-A number is 012345678905. Put a 0 in front and you get the EAN-13 number 0012345678905, which has the same check digit.
ISBN-13 and other numbers that use the EAN-13 formula
An ISBN-13 is an EAN-13 number that starts with 978 or 979, so enter the first 12 digits of an ISBN-13 in EAN-13 mode to get its last digit. This page does not draw the price add-on that some book barcodes carry. ISBN-10 numbers use a different rule and need to be converted to 13 digits first.
Making your own numbers for inventory
Items that stay inside your store or company do not need a GS1 number. Use a restricted-circulation range: EAN-13 numbers starting with 020-029, 040-049, or 200-299, which for UPC-A means numbers starting with 2 or 4. Generate internal-use code adds a random number starting with 02 in EAN-13 mode, or 2 in UPC-A mode, with the check digit included. Random numbers can repeat, so the Check each line list marks any repeat as Duplicate.
Print size and white margins
At 100% size, the narrowest bar is 0.33 mm (about 0.013 in) wide. An EAN-13 symbol with its white margins is then about 37.3 mm (1.47 in) wide, and most scanners accept 80% to 200% of that size. The preview, the downloads, and the label layouts on this page include the white margins on both sides. Keep them clear of text and borders when you place the barcode in a design.
Why a barcode is rejected or will not scan
The last digit of a 13-digit number is wrong
A number from a spreadsheet or a typed list fails validation at a retailer or marketplace because one digit was mistyped, often the last one.
💡 See the solution▼
A leading zero was dropped
Spreadsheets turn 012345678905 into 12345678905. A 12-digit UPC-A that lost its zero looks like an 11-digit base number, so a new check digit gets added to it.
💡 See the solution▼
An internal-use number ends up on a product sold elsewhere
A number from the 020-029 range appears on a product listed with a retailer or marketplace, where another seller or the retailer's own system may already use the same number.
💡 See the solution▼
The printed barcode is too small or has no margin
The bars blur together, or a border or text touches them, so a scanner cannot find where the code starts.
💡 See the solution▼
Two products share one number
In a long list, the same number gets pasted twice, and stock counts or sales get mixed up.
💡 See the solution▼
Questions about EAN-13, UPC-A, and check digits
Q.How do I calculate the EAN-13 check digit by hand?
A. Multiply the first 12 digits by 1, 3, 1, 3, and so on from the left, then add the products. The check digit is the amount needed to reach the next multiple of 10, or 0 if the sum already ends in 0. For 590123412345 the sum is 83, so the check digit is 90 - 83 = 7. The Check digit math section shows the same steps for the number in the preview.
Q.Is a UPC-A the same as an EAN-13?
A. Almost. A UPC-A has 12 digits and an EAN-13 has 13, but a UPC-A is an EAN-13 with a 0 in front. The bars and the check digit are the same. When you enter an EAN-13 that starts with 0, this page also shows the matching UPC-A number, and in UPC-A mode it shows the EAN-13 form.
Q.Why does my 13-digit number come out with a different last digit?
A. The last digit you typed does not match the digit calculated from the first 12. The calculator replaces it and shows a note under the preview with the old and new digits. Compare the first 12 digits with your source, because a typo there changes the correct check digit too.
Q.Can I make my own barcode numbers for inventory?
A. Yes, for items that stay inside your own store, warehouse, or company. GS1 sets aside the ranges 020-029, 040-049, and 200-299 for restricted circulation. Generate internal-use code adds a random number that starts with 02 in EAN-13 mode, or with 2 in UPC-A mode, with the check digit included. Give each item its own number. These numbers are not registered to anyone.
Q.Do I need to buy GS1 barcodes to sell on Amazon or in stores?
A. Usually yes. Most retailers and marketplaces, including Amazon, expect a GTIN issued by GS1 and may check it against GS1 records. Some marketplaces make exceptions for certain products, so read the seller rules for the one you use. A number made on this page, even with a valid check digit, is not registered to your business.
Q.What size should I print an EAN-13 barcode?
A. At 100% size, the narrowest bar is 0.33 mm (about 0.013 in) wide, and an EAN-13 symbol with its white margins is about 37.3 mm (1.47 in) wide. Most scanners accept 80% to 200% of that size. The label sheet layouts on this page fit the barcode to the label and cap the bar width at about 200% of the standard size. Scan a test print before you print a full sheet.
Q.Can I make many barcodes at once?
A. Enter one number per line. The Check each line list shows the result for every line, Copy all numbers copies the full numbers with their check digits, and the print panel prints every barcode. The preview and the SVG and PNG downloads handle one barcode at a time. Select a number under the preview to switch to it.
Q.Are my numbers sent to a server?
A. No. The check digit, the drawing, the SVG and PNG files, and the print layout are all produced in your browser, and this tool does not send the numbers you type anywhere.
Your feedback
makes this tool better.
Tell us which features you'd like, what should be fixed, or which new tool you'd like to see. An engineer reads every submission and uses it to guide development.