Barcode Generator

Generate Code 128 barcodes for any text or number. Renders as SVG in the browser — no server, no library.

0 / 40 characters
Enter text above to generate a Code 128 barcode

What is Code 128?

Code 128 is a high-density linear barcode symbology that can encode all 128 ASCII characters. It is widely used in shipping labels, product packaging, inventory systems, and retail applications across the world including India.

Code 128B

Encodes all printable ASCII characters (32–127). Best for alphanumeric codes with uppercase and lowercase letters.

High Density

Code 128 packs more data per unit area than older barcodes like Code 39, making it ideal for labels with limited space.

Error Checking

Every Code 128 barcode includes a mandatory checksum digit calculated from the encoded data, ensuring scan accuracy.

Frequently asked questions

What characters can Code 128 encode?

This generator uses Code 128B which encodes all printable ASCII characters — letters (A–Z, a–z), numbers (0–9), and symbols like ! @ # $ % & * ( ) - + = etc. Control characters below ASCII 32 are not supported.

Can I scan the generated barcode with my phone?

Yes. Download the SVG and print it, or display it on screen. Any standard barcode scanner app or dedicated hardware scanner will read it. Ensure the barcode is printed at a reasonable size — at least 2 cm tall.

What is the checksum and why does it matter?

The Code 128 checksum is a calculated digit appended before the stop symbol. Scanners verify this digit to confirm the barcode was read correctly, preventing errors in inventory or shipping workflows.

Can I use this for product barcodes like EAN-13?

This generator produces Code 128 barcodes, not EAN-13 or UPC. For retail product barcodes you need to purchase an official EAN/UPC prefix from GS1 India (gs1india.org). Code 128 is suitable for internal product codes and shipping labels.

How do I print the barcode?

Click "Download SVG" to save the file, then open it in any browser or vector editor and print. SVG is infinitely scalable so there is no quality loss at any print size. For thermal label printers, convert the SVG to PDF first.