Code 128 Barcode Generator
The general purpose barcode, any printable text.
Any printable ASCII: letters, digits, punctuation and spaces.
The general purpose barcode, any printable text.
How to use it
- Type the value. Any printable ASCII. Case is kept, unlike Code 39, so SHIP-42 and ship-42 are different codes.
- Check what came out. The line under the code shows exactly what was encoded. The check symbol is added automatically and is not shown.
- Download the SVG. Print at the size the label needs. A run of digits packs tighter, so numeric codes come out noticeably narrower.
When you would use this
Code 128 is the general purpose barcode: shipping labels, pallet tags, internal part numbers, anything that needs letters and digits together. It holds the full printable ASCII set and carries a check symbol calculated from every character before it, which the scanner verifies and never shows. Density is its advantage over Code 39. An even run of digits is packed two digits into one symbol, so a numeric code comes out close to half the width of the same content in Code 39. Case is significant, so SHIP-42 and ship-42 are genuinely different codes rather than the same one written differently. Characters outside printable ASCII are refused rather than substituted.
Questions
- Why is a number shorter than a word of the same length?
- An even run of digits is packed two per symbol, which nearly halves the width. Anything else is encoded one character per symbol.
- Is there a check digit?
- Yes, a check symbol calculated from everything before it. It is part of the pattern rather than a visible digit, which is why the printed line matches what you typed.
- Why will my printed barcode not scan?
- Usually size or the margin. Print from the SVG at its intended size, keep the clear space either side, and use black on white rather than a colour.