Going Stellar

Home/Free tools

Free tool

EAN-13 and UPC-A generator and check digit calculator

Type the first 12 digits of an EAN-13 (or 11 of a UPC-A) and get the check digit and the barcode as an SVG or PNG image. Type the full number and the tool tells you whether the check digit is right. This tool does not issue codes. A number that is valid for retail is bought from GS1, and a number made up here is not registered to you. Everything runs in your browser, nothing is uploaded.

Format

Result

Check digit
3
Full number
6291041500213
Format
EAN-13
6291041500213

How the check digit was calculated

Digit629104150021
Weight×1×3×1×3×1×3×1×3×1×3×1×3
Digit × weight66930121150023
  1. Add the products: sum = 57
  2. Nearest multiple of ten that is equal or higher: 60. 60 − 57 = 3, so the check digit is 3

A valid number is not an official number

A correct check digit only shows that a number is well formed. It does not show who the number belongs to. GS1 says it is “the only official provider of GS1 GTINs and EAN/UPC barcodes globally”, and that your local GS1 office registers your business and assigns your GS1 company prefix (GS1, get your barcodes, read on 29 November 2026). The GS1 site also lists a “Who owns this barcode?” service.

  • Use this tool to check a number you already have, to understand how the check digit works, or to make test images for a layout.
  • Do not put a number you made up here on a product you sell. It may already belong to someone else.
  • To get official numbers, contact the GS1 office of your country. GS1 lists its local organisations on the page above.

GS1: get your barcodes · GS1: EAN/UPC barcodes

How the check digit is calculated

The method is the one GS1 publishes (How to calculate a check digit manually, read on 29 November 2026): multiply each digit by 3 and 1 in turn, starting with 3 on the digit next to the check digit and moving left; add the products; the check digit is the amount that brings the sum up to the next multiple of ten. The same method applies to GTIN-8, GTIN-12 (UPC-A), GTIN-13 (EAN-13) and GTIN-14.

GS1's own example: 6 2 9 1 0 4 1 5 0 0 2 1 gives products 6, 6, 9, 3, 0, 12, 1, 15, 0, 0, 2, 3. The sum is 57, the next multiple of ten is 60, and 60 − 57 = 3. The full number is 6291041500213. This is the number the page starts with.

About the image

  • An EAN-13 is drawn with 95 modules: a 3-module start guard, 6 digits of 7 modules, a 5-module centre guard, 6 more digits and a 3-module end guard (3 + 42 + 5 + 42 + 3 = 95). The first digit is not drawn in bars: it selects the pattern of the left-hand digits.
  • A UPC-A is drawn as an EAN-13 with a 0 in front, which gives the same bars.
  • The SVG scales without loss. The PNG is 6 pixels per module. For print, check the size and quality with your printer or a barcode verifier first; the sizes in the GS1 General Specifications were not read for this page.
  • The image is built in your browser. No code, number or picture leaves the page.

Formats covered

EAN-13 (13 digits) and UPC-A (12 digits). EAN-8, UPC-E, ITF-14 and the 2D codes are not covered here.

Questions and answers

Can I use the number this tool gives me on my products?

The tool does not give numbers, it calculates a check digit for a number you type. A number you invent is not registered to your company. For retail, get your numbers from GS1.

What is the difference between EAN-13 and UPC-A?

EAN-13 has 13 digits and UPC-A has 12. Both end with a check digit calculated the same way. A UPC-A is drawn as an EAN-13 with a 0 in front.

Why is my check digit wrong?

Usually a typo or a swapped pair of digits. Type the full number and the tool shows the check digit it expects and the same number with the right check digit.

Is the barcode picture ready for print?

It is a correct pattern of bars and digits, good for layouts and tests. Before printing at scale, check size, contrast and quiet zones with your printer or a verifier.

Is my data sent anywhere?

No. Everything, including the images, is made in your browser.