Barcode Generator
Generate Code128-B barcodes from text — fully browser-based with no external libraries.
Format: Code128-B (ASCII printable characters)
What this barcode generator does
This free tool turns plain text into a scannable Code128-B barcode right in your browser. Code128-B is one of the most widely supported linear (1D) barcode symbologies, used for shipping labels, inventory tags, warehouse tracking, internal asset numbering, and product references. It can encode any printable ASCII character from 32 to 126, which covers uppercase and lowercase letters, digits 0-9, spaces, and common punctuation.
Unlike many online generators, this tool does not rely on any external barcode libraries or a server-side API. The Code128-B encoding, check-digit calculation, and the bar pattern are all computed locally and drawn onto an HTML canvas. That means it works offline once the page has loaded and your input never gets uploaded anywhere.
How to generate and download a barcode
Type or paste your value into the Text / Value field. The input is automatically converted to a consistent case as you type, and the barcode preview updates instantly with every change. Use the height slider to set the bar height anywhere between 40 and 200 pixels, which is handy when you need a taller barcode for easier scanning or a shorter one to fit a small label.
The generated barcode includes a quiet zone (the blank margin scanners need) and prints the encoded text underneath the bars for human readability. When you are happy with the result, click Download PNG to save a transparent-free, white-background image you can drop into a label template, document, or print sheet.
Tips for reliable scanning
If you see an error, your text contains a character outside the Code128-B range; stick to standard ASCII printable characters. For dependable scanning, keep the bar height tall enough that a scanner can find the bars even if the label is slightly tilted, and never crop the white margins on either side. When printing, avoid resizing the PNG in a way that blurs the bars, and print at a resolution high enough that the thinnest bars stay crisp. Always test-scan a printed sample before producing a full batch of labels.