Barcode Generator🔒 100% local
Generate Code 128-B barcodes as PNG in your browser. Valid checksums, spec quiet zones. No uploads — privacy-first.
Code 128-B barcode
Encodes printable ASCII (32–126) with automatic checksum and 10-module quiet zones per the Code 128 spec.
Related Tools
Encodes text as a Code 128-B barcode and paints the bars on a canvas, then offers the image as a downloadable PNG. It builds the bar pattern from a built-in table, appends the modulo-103 check symbol the standard requires and pads a ten-module quiet zone on each side. The input never leaves the page; the whole barcode is generated from that local table.
How to use it
- Type the text to encode - printable ASCII only.
- Set the bar height with the slider and choose whether the characters appear under the bars.
- Press Generate barcode.
- Download PNG to save the image.
Worked example
123456789012becomesA 374 px wide PNG barcode at the default 80 px bar height, with '123456789012' printed under the bars and check symbol 24.Verified by running the code's own maths: the digit values 17,18,19,20,21,22,23,24,25,16,17,18 plus Start-B (104) give the weighted sum 1672, and 1672 mod 103 = 24. Bar modules total 167, so the canvas is (167 + 20 quiet modules) x 2 px = 374 px wide.
HELLObecomesA 220 px wide PNG barcode with check symbol 40.Bar modules total 90, so (90 + 20) x 2 = 220 px wide.
When to use it
- Making a scannable label for an internal asset or inventory sticker.
- Encoding an order, ticket or job number for a warehouse reader.
- Confirming that a string contains only characters an existing Code 128 scanner can read.
What it does not do
- It is Code 128-B only. There is no EAN, UPC, Code 39 or QR option, so an EAN-13 number encoded here will not scan as an EAN barcode even though the digits look right.
- Only character codes 32 to 126 are accepted; a tab, newline, accented letter or emoji throws an error naming the character instead of being transliterated.
- Nothing validates the content: a UPC or ISBN you type in is encoded as given, with no check that its own check digit is correct.
- The PNG carries no DPI or physical-size metadata, so when printing you must set the physical width yourself or a reader may see bars that are too thin.