Skip to main content
ToolSmartly

Barcode Generator

Pick the format and type your code: for EAN, UPC and ITF-14, the tool calculates the check digit when the last digit is missing, or validates it when it is present. Then download the barcode as PNG or SVG.

Your barcode

Which barcode format should you use?

FormatContentUse
EAN-1313 digits, including the check digitRetail products, in store and online (Europe and worldwide)
EAN-88 digits, including the check digitSmall packs where an EAN-13 does not fit
UPC-A12 digits, including the check digitProducts sold in the United States and Canada
ITF-1414 digits, including the check digitCases, cartons and logistics units
Code 128Letters, digits, symbolsLogistics, internal labels, serial numbers
Code 39Capitals, digits, a few symbolsIndustry, badges, inventory

The EAN, UPC and ITF-14 check digit

The last digit of these codes is calculated from the others, so that a scanner can detect a misread. Starting from the rightmost digit (excluding the check digit), multiply the digits alternately by 3 and 1, add them up, and the check digit is what you need to reach the next multiple of 10.

Example with 400638133393: the weighted sum is 89, the next multiple of 10 is 90, so the check digit is 1 and the full EAN-13 is 4006381333931. Type 12 digits and the tool adds the check digit; type all 13 and it validates it.

You cannot make up an EAN or UPC

To sell a product in shops or on marketplaces, its EAN or UPC must be assigned to your company by GS1: a random number may already belong to another product. This tool draws the barcode for a number you already own; it does not provide numbers.

Complementary tools

Tools often used with Barcode Generator

Choosing the right barcode format

The barcode is drawn in your browser with the JsBarcode library, then downloaded as SVG (vector, sharp at any size, best for print) or PNG. For GS1 formats (EAN, UPC, ITF-14), the check digit is calculated or verified automatically.

How to use it

  1. Choose the format for your use (see the table below).
  2. Enter the code. For an EAN-13, type 12 digits and the tool adds the check digit; type all 13 and it verifies it.
  3. Adjust the height, bar width and text display, then download as SVG or PNG.

Which format for which use?

FormatContentUse
EAN-1313 digitsretail products (Europe and most of the world)
EAN-88 digitssmall packages
UPC-A12 digitsretail products in the US and Canada
ITF-1414 digitsshipping cartons and cases
Code 128letters, digits, symbolsinternal labels, parcels, serial numbers
Code 39capitals, digits, a few symbolsindustry, badges, legacy systems

How the check digit is calculated

For an EAN-13 such as 590123412345: multiply the digits, starting from the right, alternately by 3 and by 1, add them up, then take what is needed to reach the next multiple of ten. Here the check digit is 7, so the full code is 5901234123457. A typo in any single digit changes the check digit, which is how checkouts detect a misread.

Frequently asked questions

Can I make up an EAN or UPC to sell my product?

No. A barcode used in retail must belong to your company: number ranges are issued by GS1, the standards body, through your country’s GS1 office. Codes starting with 20 to 29 are reserved for internal use (in-store labels, stock) and must not leave the business.

SVG or PNG?

SVG for printing and layout software: it stays sharp at any size. PNG for office documents or a website; keep it large enough for the bars to stay crisp.

Why won’t my text encode as EAN-13?

EAN, UPC and ITF-14 accept digits only, in a fixed length. For letters or a free-length reference, choose Code 128.