Generate Code 128 barcodes from any ASCII text. Customize height and bar width, preview instantly, and download as SVG — entirely in your browser.
Characters
13
Symbology
Code 128 B
Modules
67
Preview
Hello, World!
This barcode generator converts ASCII text into a Code 128 B symbol and renders the result as SVG. Code 128 stores text as a sequence of narrow and wide bars and spaces, then adds a checksum and stop pattern so compatible scanners can validate the symbol.
Code 128 is useful when one compact barcode must hold more than a short numeric identifier. It is common in shipping labels, warehouse inventory, internal asset tags, document references, and test data. This tool runs in the browser, so input is not uploaded to a server.
Code 128 B covers ASCII character codes 32 through 127. Printable letters, numbers, punctuation, and the DEL character are accepted. Unicode characters such as emoji, accented letters, and non-Latin scripts are rejected because they are outside this symbology subset.
The generated symbol contains:
| Option | Effect |
|---|---|
| Bar height | Changes vertical size of bars |
| Bar width | Changes width of each narrow module |
Increasing bar width makes the barcode wider without changing encoded data. Increasing height can improve readability when the symbol is printed small, but the final result should always be tested with the target scanner and printer.
SVG is a vector format, so bars remain sharp when scaled. Download the markup as barcode.svg, copy it into an HTML document, or place it in a label-generation workflow:
<img src="barcode.svg" alt="Code 128 barcode">
const svg = `<svg xmlns="http://www.w3.org/2000/svg">...</svg>`;
document.querySelector("#label").innerHTML = svg;
from pathlib import Path
Path("barcode.svg").write_text(svg, encoding="utf-8")
| Format | Best for | Text support |
|---|---|---|
| Code 128 | Shipping, logistics, internal labels | ASCII |
| Code 39 | Simple industrial labels | Limited alphanumeric |
| EAN-13 | Retail products | Fixed 13-digit numbers |
| QR Code | URLs and two-dimensional data | Broad Unicode support |
Choose a retail-specific format when a standards body or point-of-sale system requires it. Choose a QR code when the payload needs URLs, Unicode, or substantially more data.
This generator is intended for general-purpose symbols and development workflows. Regulated shipping, healthcare, retail, and compliance labels may require additional application identifiers, dimensions, human-readable text, or verification steps.
This tool is provided for general informational and utility purposes only. Results may be inaccurate, incomplete, outdated, or contain errors. Always verify results before relying on or using them.
Some tools may use AI, automated processing, third-party services, or server-side processing. Do not rely on these tools as a substitute for professional advice.
Use at your own risk. BestToolOnline makes no guarantees regarding the accuracy, reliability, completeness, availability, or suitability of results, to the maximum extent permitted by applicable law.
See our Terms of Service and Privacy Policy for complete details.