Use this free barcode generator to create Code 128, EAN-13, and UPC-A barcodes. Enter your value, pick a size, and download the barcode as an SVG file. The check digit for EAN-13 and UPC-A is calculated for you. Everything is drawn in your browser, so nothing you enter is sent to our servers.

A barcode stores a short code that a scanner reads and matches to a record, such as an inventory item, a shipping label, or a ticket. The code is only useful if the system reading it knows what it means.

How to use the barcode generator

  • Choose the type: Code 128 for any text, EAN-13 for 12 digits, or UPC-A for 11 digits.
  • Enter the value: type the text or digits. The preview updates as you type.
  • Choose the size: Small, Medium, or Large sets the width of each bar.
  • Download: save the barcode as an SVG, which stays sharp at any print size.

Barcode types at a glance

TypeInputBest for
Code 128Any ASCII text, up to 80 charactersInternal labels, inventory, shipping
EAN-1312 digits, check digit addedRetail products in Europe and elsewhere
UPC-A11 digits, check digit addedRetail products in North America

How the check digit works

EAN-13 and UPC-A end in a check digit. Scanners use it to catch reading errors. For UPC-A, multiply the digits in odd positions by 3 and add the even-position digits. The check digit brings the total to a multiple of 10. For example, for the 11 digits 03600029145, the sum is 3×(0+6+0+2+9+4)... combined with the other digits, giving a check digit of 2.

Worked examples

An inventory label

Choose Code 128 and enter SKU-00457. Print the barcode at Medium size and attach it to the shelf bin.

A product barcode with a check digit

Choose UPC-A and enter 11 digits. The tool adds the twelfth digit for you, so you only need to type the first eleven.

Common mistakes

  • Printing too small. Small barcodes can fail to scan. Use Large for handheld scanners or printed labels viewed from a distance.
  • Low contrast. Print black bars on a white background. Coloured or dark backgrounds often stop scanners reading.
  • Missing quiet zone. Leave a clear margin of blank space on both sides of the barcode.
  • Using a made-up number for retail. Stores need barcodes registered with GS1, which is the organisation that issues them.

Frequently asked questions

What types of barcode can I create?

The tool creates Code 128, which can encode letters, numbers, and common symbols, plus EAN-13 and UPC-A, the retail product barcodes used on most packaged goods.

How is the check digit calculated?

For EAN-13 and UPC-A, the last digit is calculated from the other digits using a weighted sum, so scanners can detect reading errors. The tool calculates it for you.

Can I use these barcodes on products I sell in stores?

Retail stores usually require a GS1 barcode. Numbers made here are not registered, so they may clash with another company's product. Register your own company prefix with GS1 before selling in stores.

Why does my barcode not scan?

Print it large enough, keep high contrast between the bars and background, and leave a clear margin on each side. Test with a scanner app before printing many copies.

Is the Xornex barcode generator free?

Yes. The Xornex barcode generator is available to use free of charge.

Share this article