Maaz Zindani

Loading the index…

↑↓ move↵ openesc close3993 pages

Free tool · Generators

Barcode generator

Type a number or text, choose the barcode type, and the bars appear with the check digit worked out and shown. Download the barcode as SVG or PNG.

  • Free
  • No sign-up
  • Runs in your browser

By Maaz Zindani · Updated

Barcode type
12 digits (the check digit is added) or 13 digits with it.

Barcode settings

Bar width
Options
Your barcode
5901234123457

5901234123457

  • EAN-13
  • Not a registered GS1 number
Check digit
7 (calculated)
Modules
107
Image size
341 × 152 px

5×1 + 9×3 + 0×1 + 1×3 + 2×1 + 3×3 + 4×1 + 1×3 + 2×1 + 3×3 + 4×1 + 5×3 = 83. Next multiple of 10: 90. Check digit: 90 − 83 = 7.

This draws the bar pattern only. GS1 issues retail barcode numbers through a company prefix, so a made-up number is for tests and demos, not for products you sell.

How to use the Barcode Generator

  1. Pick a Barcode type: EAN-13, EAN-8, UPC-A, Code 128, Code 39 or ITF-14. Press Use an example if you want a valid number to start from.
  2. Type the Number or text. For EAN, UPC and ITF-14 you can leave the last digit off and the tool adds it, or type it and the tool checks it.
  3. Read the Check digit and the working line under the barcode. Change Bar width, Bar height or the numbers under the bars if needed.
  4. Press Download SVG or Download PNG. Scan the saved file before you print it.

How do I make a barcode, and will shops accept it?

Choose a type, type your number or text, and download the bars as SVG or PNG. That is all this tool does: it draws the bar pattern for a value you give it. It does not register the number to you. GS1 US explains that a GS1 barcode identifies a single retail product and identifies your company as the brand owner of that product, and that each variation of each product needs its own barcode. GS1 US adds that a business can license a GS1 Company Prefix to create its barcodes, and that retailers look for the brand-owner information a GS1 barcode carries.

A made-up EAN-13 or UPC-A number will draw and will scan, but it is not registered to you and can clash with another company's product. Use the tool for tests, shelf labels, demos, learning and internal codes you invent yourself. For products sold through retail channels, get your numbers from GS1 or from the source your retailer names. Marketplaces set their own barcode rules, and this page cannot tell you what a given one requires today, so read its current rules.

How is the check digit calculated?

For EAN-13, EAN-8, UPC-A and ITF-14 this tool uses one method, a modulo-10 sum. Start at the right-hand end of the digits you typed, without the check digit. Multiply that digit by 3, the next one to the left by 1, then 3, 1, 3 and so on. Add the products. The check digit is the number that raises the sum to the next multiple of 10, and it is 0 if the sum already is one. Because the weights are counted from the right, it does not matter whether the number is 7, 11, 12 or 13 digits long.

Worked example 1, EAN-13. Take 590123412345. The products are 5×1 + 9×3 + 0×1 + 1×3 + 2×1 + 3×3 + 4×1 + 1×3 + 2×1 + 3×3 + 4×1 + 5×3, which add up to 83. The next multiple of 10 is 90, so the check digit is 7 and the full number is 5901234123457. Worked example 2, UPC-A. Take 03600029145. The sum is 58, the next multiple of 10 is 60, and the check digit is 2, giving 036000291452. The same digits with a zero in front, 003600029145, have a sum of 58 and the same check digit 2, which is why a UPC-A number and its EAN-13 form with a leading zero end in the same digit.

If you type the full number and the last digit does not match, the tool refuses to draw it and says what it should be. For 5901234123458 it says: "The last digit is 8, but the check digit for 590123412345 is 7. Fix the digits, or use 5901234123457." A button then puts the right digit in for you. A scanner that reads a barcode with a wrong check digit should reject it, so this check catches typing mistakes before you print.

What is the difference between EAN-13, UPC-A, Code 128 and the others?

In this tool EAN-13 takes 13 digits, UPC-A 12, ITF-14 14 and EAN-8 8, and the last digit of each is the check digit. All four are digits only. Code 128 takes plain ASCII text, such as an order number, a serial number or a shelf location, and the tool adds the check character inside the bars. Code 39 takes digits, capital letters, a space and the symbols - . $ / + %, and the tool offers an optional modulo-43 check character.

The table shows what each type gives for one example value, all worked out by the tool at the default bar width of 3 px. A module is one unit of bar width, and the more modules, the wider the image. Choose the type from what the receiver asks for, not from what looks neatest. If nobody has told you which type to use, ask the person who will scan the code.

One example per barcode type, worked out by this tool
TypeYou typeCheck digit or characterFull valueModules
EAN-1359012341234575901234123457107
UPC-A036000291452036000291452111
EAN-8963850749638507467
ITF-141001234567890210012345678902135
Code 128Hello76 (start B, 5 symbols)Hello90
Code 128123456789085 (start C, 5 symbols)123456789090
Code 39HELLOB (optional, modulo 43)HELLO112

Look at the two Code 128 rows. Ten digits take 5 symbols and 90 modules, while the five letters of Hello take 5 symbols and also 90 modules. The tool lets the barcode library pick the start set: start C packs two digits into one symbol, and start B is used for the mixed text. A longer value such as Order-2026-0042 needs 14 symbols and 189 modules, so the barcode is much wider.

How is the Code 128 check character worked out?

Code 128 has its own check method. Take the value of the start symbol, then add each data symbol's value multiplied by its position (1 for the first, 2 for the second and so on). Divide the total by 103 and the remainder is the check character, which sits just before the stop pattern. The tool does not trust its own drawing: it reads the check character back out of the finished bars and confirms that the sum matches. For Hello it reads 76, and for 1234567890 it reads 85.

The optional Code 39 check character is simpler. Give each character its place in the list 0-9, A-Z, then - . space $ / + %, add the places, and take the remainder after dividing by 43. For HELLO the tool shows B. Many Code 39 users skip the check character, so switch it on only when the system that reads the code expects it.

How do I print a barcode at the right size?

Print the SVG, or a PNG at 100% scale, and switch off "fit to page", which stretches the bars unevenly. Keep the white margin around the bars, because scanners use it to find where the code starts. The Bar width sets how many pixels one module is, and the result card shows the image size. At the default bar width of 3 px, the EAN-13 above is 107 modules wide, plus the margin. A larger bar width gives a larger image with the same shape.

Print a test sheet, scan it with the phone or scanner that will be used, and check that the number it reads matches the one you typed. For retail packaging, ask GS1 or your retailer for the size and print-quality rules that apply to your barcode type. This page does not give those figures.

Use it with

Questions

Can I make a barcode for free?

Yes. This tool draws EAN-13, EAN-8, UPC-A, Code 128, Code 39 and ITF-14 for any valid value, with no sign-up. Drawing the bars is free, but numbers for retail products come from GS1.

What is the check digit for 590123412345?

It is 7. The products add up to 83, the next multiple of 10 is 90, and 90 minus 83 is 7, so the full EAN-13 is 5901234123457.

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

In this tool EAN-13 has 13 digits and UPC-A has 12. The check digit is worked out the same way, so a UPC-A number with a zero added in front keeps its check digit: 03600029145 and 003600029145 both give 2.

Do I need to buy a barcode to sell on a marketplace?

It depends on the marketplace and the category, and this page cannot check current rules. GS1 US says a GS1 barcode identifies you as the brand owner and that retailers look for that, so read the rules of the place you sell on.

What happens if I type the wrong check digit?

The tool does not draw it. For 5901234123458 it tells you the check digit should be 7 and offers a button to use 5901234123457.

Is the number I type uploaded?

No. The bars are drawn in your browser and the files are made on your device.

How this page was made: the tool's results are computed in your browser by the code on this page, using the sources listed above; the explanations were drafted with AI help and checked against the tool's own output.