Barcode Generator (Code 128 & EAN-13)

Generate Code 128 and EAN-13 barcodes with automatic check characters and PNG export.

Free
Every tool runs inside your browser; no data is ever sent to our servers.
Enter data to see the barcode

About Barcode Generator (Code 128 & EAN-13)

Code set C in Code 128 packs two digits into a single 11-module symbol, so a 12-digit number costs 6 symbols instead of 12. This generator switches between code sets A, B and C on its own and computes the modulo-103 check character for you. The most common failure is cropping the white margin: without at least 10 modules of quiet zone, a scanner will not even locate the barcode.

How to use Barcode Generator (Code 128 & EAN-13)

  1. 1

    Type the text or number you want to encode.

  2. 2

    Choose Code 128 or EAN-13 as the symbology.

  3. 3

    Set the module width and bar height with the sliders.

  4. 4

    Tick the readable-text option to print the data under the bars.

  5. 5

    Hit Download PNG to save the barcode.

Frequently asked questions

Why does my accented or non-Latin text fail?

Code 128 covers only ASCII characters 0-127, so accented letters and non-Latin scripts fall outside it. Rather than silently emitting a barcode no scanner decodes correctly, the tool raises an error and shows you the offending character. Use a QR code for that data instead.

What is the difference between code sets A, B and C?

Set A carries uppercase letters and control characters, set B carries upper and lowercase, and set C carries pairs of digits only. You never pick one manually: the tool takes the shortest option for each run of data and prints the resulting switch sequence under the barcode.

Do I have to supply the EAN-13 check digit myself?

No. Enter 12 digits and the thirteenth is derived with the alternating 1 and 3 weighting. Enter all 13 and the tool validates your check digit instead, reporting the correct value when it disagrees.

My printed barcode will not scan. What went wrong?

Usually the image was scaled down on the way to the printer, or the white margin was trimmed. Print the PNG at its native pixel size and keep module width at 2 or above. Note the output is a bitmap, not vector: for large-format printing raise the module width rather than enlarging the image.