Result

Enter data to create a barcode.

How to use this tool

  • Choose Code 128 for letters, numbers and symbols, or EAN-13 for retail product numbers.
  • For EAN-13, enter 12 digits and the check digit is added, or 13 digits to have the check digit verified. For a 12-digit UPC-A code, add a leading 0.
  • Download as PNG or SVG and test with a scanner before printing in bulk.

How it works

Code 128 turns each character into a pattern of 3 bars and 3 spaces 11 modules wide. All-digit data of even length uses code set C, which packs two digits per symbol. A checksum (start value plus each symbol × its position, modulo 103) is added before the stop pattern.

EAN-13 check digit: multiply the first 12 digits alternately by 1 and 3, add them, and the check digit makes the total a multiple of 10. The first digit chooses the parity pattern for the left half.

Example

EAN-13 check digit

For 400638133393: odd positions 4+0+3+1+3+9 = 20, even positions (0+6+8+3+3+3) × 3 = 69, total 89, so the check digit is 1 and the full code is 4006381333931.

Privacy and limitations

  • Barcodes are generated in your browser.
  • Retail EAN/UPC numbers must be licensed from GS1; making up a number does not register a product.
  • Print quality matters: keep the quiet zones (blank margins) and avoid stretching the image.

Frequently asked questions

Which barcode should I use?

Use EAN-13 (or UPC-A) for products sold in shops, and Code 128 for shipping labels, asset tags and internal inventory.

Can a barcode hold a web link?

Code 128 can hold short text, but phones scan QR codes far more reliably. Use the QR Code Generator for links.