A barcode represents data through a machine-readable pattern of bars and spaces. This page draws a Code 128-B-style symbol for ASCII text, with a human-readable line printed beneath it. It is a lightweight image generator for prototypes and sample labels, not a complete retail-labeling or inventory system. Confirm the symbology required by the scanner and downstream application before using an image operationally. A code can look correct on screen and still fail to scan if the content, quiet zone, print scale, or symbol standard does not meet the reader's expectations.
The text input starts with `Hello123`; replace it with an ASCII value. Adjust Bar Width from 1 to 4 pixels and Height from 50 to 200 pixels. The canvas redraws when any of those values change, and Download saves the current canvas as barcode.png. The displayed caption repeats the entered text below the bars. There is no explicit Generate button, no format selector, and no validation message for unsupported characters, so inspect the rendered result rather than assuming every string was encoded in full.
For example, enter `ORDER-42`, keep the default two-pixel bar width and 100-pixel height, and download the canvas. The output contains Code 128 start, data, checksum, and stop patterns, plus the visible caption. The encoder uses the Code Set B character mapping for printable ASCII; unsupported characters are skipped during encoding even though the caption can still display them. Test the exported image with the actual scanner and compare decoded content with the intended input before putting it on a physical label.
The available controls change only text and drawing dimensions. The generated result is a raster PNG created from a canvas, with black bars on a white field and fixed horizontal padding. It does not provide EAN-13, UPC, Code 39, QR, GS1 application identifiers, configurable quiet zones, font choice, vector output, or batch labels. QR Code Generator supports a separate two-dimensional format and configurable foreground/background colors. Choose the correct format for the consuming system instead of treating barcode standards as interchangeable.
Use the tool for a UI mockup, a scanner demonstration, internal proof-of-concept labels, or a quick image showing how encoded text might occupy space. QR Code Generator is a related option for URL and text payloads that need more capacity or camera-oriented scanning. Lorem Ipsum Generator can create benign sample strings, while File Hash Checker is helpful when verifying an exported image artifact against a trusted digest. None of these utilities assigns inventory IDs or validates an organization's product-code rules.
Encoding and drawing occur in the client component on a canvas; there is no barcode-generation server request. The input and image remain in the page, and the download action saves a local PNG. The code defines a Code 128 pattern table and skips unsupported characters rather than warning, so non-ASCII text may yield a barcode for only part of the entered value. Very long input expands canvas width and may exceed practical browser or printer limits. Avoid encoding personal identifiers unless the label workflow has appropriate safeguards.
Before using a barcode beyond a prototype, check symbology requirements, ensure the encoded value is unique and valid for the receiving system, and test at the final physical size on the intended printer and scanner. Keep adequate contrast and do not crop the start/stop regions. The human-readable caption is helpful but does not prove the bars represent the same characters. If a scan fails, try a wider bar setting, review input character support, and confirm that the receiving scanner accepts Code 128-B.
The encoder starts in Code Set B and calculates a checksum value from each supported character's position and weight before appending the stop pattern. That implementation detail makes this a helpful illustration of how a linear barcode includes more than arbitrary black lines. It also means the selected symbology and encoding rules matter: a device configured for a different standard will not interpret the symbol as intended, even when the bars are crisp and the caption looks correct.
Image dimensions grow with the number of encoded pattern modules and chosen bar width. Longer input therefore creates a wider canvas, while increasing bar width can make narrow bars easier to reproduce but may make the total image too large for a label. The height slider changes the vertical bar area but does not change the encoded value. Check the final print dimensions in physical units, because browser pixel dimensions alone do not ensure a scanner can resolve each bar.
The human-readable text beneath the bars is a convenience for people and can help catch a mismatch during inspection, but it is drawn from the original input rather than decoded from the finished image. If an unsupported character was skipped by the encoder, the caption may still include it, making visual review especially important. Scan the exported PNG with a decoder and compare the decoded string byte for byte with the intended value before distributing labels.
Keep a copy of the exact source string with the exported image so later reviewers can verify the scanned payload.
The sample uses a local pattern table rather than a general barcode package, so its support and edge-case handling are limited to what the component implements. It does not provide structured validation for product identifiers or warn when text is skipped. Keep encoded content simple during a first test, and compare the scan result with the original input before attempting longer strings. If you need regulated or retail barcode output, use a maintained standards-aware product and verify it against the receiving system.