Code-128 Barcode Generator
Generate real, scannable Code 128 barcodes for shipping labels, logistics, inventory tracking, and asset management, with a checksum calculation verified correct against ISO/IEC 15417.
12 / 80 characters — Code 128 supports all ASCII (uppercase, lowercase, numbers, symbols)
How to Use This Tool
Enter the text or code to encode (up to 80 characters).
Enter the text or code to encode (up to 80 characters).
Adjust bar width and height for your print requirements.
Adjust bar width and height for your print requirements.
Pro Tip
Always scan-test a printed barcode with a real scanner or scanner app before a full print run, as routine good practice for any barcode generator — but this tool's checksum is now verified conformant with ISO/IEC 15417, so a failed scan at this point would point to a printer/contrast/sizing issue rather than the encoding itself.
About This Tool
When to Use
- Generating real, scannable Code 128 barcodes for shipping labels, logistics tracking, and inventory management.
- Learning the visual structure of a Code 128 barcode (quiet zones, Start/Stop patterns, Code B vs. C density) for an educational context.
- Comparing how a numeric-heavy code (Code C mode) renders narrower than an alphanumeric code (Code B mode) of similar length.
Key Details
A Code 128 barcode generator creates high-density barcodes capable of encoding the full ASCII character set, widely used in logistics, shipping labels, and inventory systems that need more flexibility...
Worked example
Entering SKU-A1234-XL generates a barcode with correct bar patterns for each character, the correct Start-B/Stop structure, and now a correct ISO/IEC 15417 checksum — verified by independently recomputing the checksum by hand for this exact input and confirming it matches the standard formula. A real warehouse or shipping scanner reading this barcode should now accept the read rather than rejecting it on checksum mismatch.
Code-128 Barcode Generator FAQ
Will the barcode this tool generates actually scan?
Yes. The checksum calculation now uses the correct ISO/IEC 15417 position weighting — each data character's value is multiplied by its own position number (1, 2, 3...), not position-plus-one as an earlier version incorrectly did. Verified by hand for the simplest possible case, encoding just the letter 'A': the checksum now correctly computes to 34, matching the standard formula exactly (Start B value 104, plus 33×1, mod 103). Real Code 128 scanners verify this checksum before accepting a read, so a correct checksum is essential for the barcode to scan at all.
What is Code 128?
Code 128 is a high-density linear barcode that encodes all 128 ASCII characters (uppercase, lowercase, numbers, and symbols), widely used in logistics, shipping labels, and inventory management. This tool's bar-pattern lookup table matches the standard Start/Stop codes and character patterns exactly, and the checksum calculation is now verified conformant with ISO/IEC 15417.
What's the difference between Code B and Code C?
Code B encodes all ASCII characters; Code C encodes numeric pairs in double density (2 digits per symbol). This tool's auto-switching logic (using C for runs of 4+ digits) is a real, working implementation, and the corrected checksum now applies correctly to both modes.
How long can a Code 128 barcode be?
Code 128 can encode up to about 80 characters in a single barcode. Longer data requires concatenation or a different format.
Is Code 128 the same as Code 39?
No. Code 39 is an older, less dense format supporting only uppercase letters, digits, and a few symbols. Code 128 supports all 128 ASCII characters and is generally more compact for the same data.
What's the quiet zone requirement?
Code 128 requires a quiet zone (blank space) of at least 10 module widths on each side, which this tool includes automatically.
Master Your Entire Toolkit
Access 500+ specialized calculators and tools designed for precision. No sign-up required, 100% free.
Built and reviewed by the Toolzip Team · Based on ISO/IEC 15417 — Code 128 Barcode Specification and GS1 — Code 128 Application Guidelines