Barcode Generator

Create a barcode in Code 128, EAN-13, UPC-A or Code 39 and download it as PNG or SVG. Check digits are added for you.

EAN-13 and UPC-A: type the digits without the last check digit and it is added for you.

Made on your device. Nothing is uploaded or stored.

How it works

Pick a barcode type, type the text or number and the barcode appears at once. Download it as a PNG for documents and labels, or as an SVG, which stays sharp at any print size.

Code 128 is the most flexible. It handles letters, numbers and symbols, and packs long runs of digits tightly. It is a good default for shipping labels, inventory and internal IDs. Code 39 is older and simpler, with capital letters, numbers and a few symbols. EAN-13 and UPC-A are the product barcodes used at the checkout. Type the digits without the last one and the check digit is worked out for you, or type all of them and the tool checks that the last digit is right.

These barcodes are made in your browser and are not uploaded. They are only the pattern of bars. To sell products in shops you also need your own company prefix from GS1, because the numbers identify who made the product.

Check it by hand: the EAN-13 base number 400638133393 has 12 digits. From the right, weight them 3, 1, 3, 1 and so on: 3×3 + 9×1 + 3×3 + 3×1 + 3×3 + 1×1 + 8×3 + 3×1 + 6×3 + 0×1 + 0×3 + 4×1 = 9 + 9 + 9 + 3 + 9 + 1 + 24 + 3 + 18 + 0 + 0 + 4 = 89. The next multiple of 10 is 90, so the check digit is 90 − 89 = 1 and the full number is 4006381333931.

EAN-13 and UPC-A check digit: from the right, multiply the digits alternately by 3 and 1, add them, then take the amount needed to reach the next multiple of 10.

Worked example

For the EAN-13 number 400638133393 the digits from the right are weighted 3, 1, 3, 1 and so on. The sum is 89, so the check digit is 1 and the full number is 4006381333931.

For internal use, a Code 128 barcode for IVORY-2026 scans with any standard scanner, with no registration needed.

Good to know

  • Test the printed barcode with a real scanner. Print it at high contrast, with black bars on a white background, and keep the blank margins on both sides.
  • A made-up EAN or UPC number can clash with a real product. Use these types only for numbers you own, and use Code 128 for private labels.
  • Code 128 here supports standard keyboard characters (ASCII). Code 39 supports A-Z, 0-9 and - . space $ / + %.
  • This tool makes one-dimensional barcodes. For a 2D code that holds a link or more text, use the QR code generator.

Questions people ask

Is the barcode generator free?

Yes. There is no sign-up, watermark or limit, and nothing is uploaded.

Which barcode type should I use?

Code 128 for most internal labels, inventory and shipping. EAN-13 or UPC-A only for retail products that have registered numbers. Code 39 if a system you use specifically asks for it.

Can I use these barcodes to sell in shops?

You need your own numbers from GS1 (or a GS1 office in your country). The barcode is only a picture of the number, and shops expect the number to belong to you.

What is the check digit?

The last digit of an EAN-13 or UPC-A number. It is calculated from the others so that scanners can catch a misread. This tool adds it for you.

Should I download PNG or SVG?

SVG for printing at any size. PNG for documents, web pages and chats.

How do I work out a UPC-A check digit?

Take the 11 digits 03600029145 and weight them from the right 3, 1, 3, 1 and so on. The sum is 58, the next multiple of 10 is 60, so the check digit is 2 and the full number is 036000291452.

Why does an EAN-13 number have 13 digits?

The first 12 digits identify the maker and the product, and the 13th is the check digit worked out from them, so a scanner can catch a misread.

Part of the guide: Developer and design tools: QR codes, passwords, JSON, colors and timestamps

Formulas and text last checked on 14 October 2026. Everything is calculated in your browser, so nothing you enter is sent or stored. Spotted a mistake? Tell us and we will fix it.