ToolSphere

Barcode Generator (Code-128)

More tools

Generate a Code 128 barcode from any text or number and download it as a PNG image. Free barcode generator that runs in your browser with no sign-up.

Barcode generator (code-128)

On this browser only

Give feedback

Did this tool help?

Tell us what worked, what didn’t, or what you’d like next.

Opens Google Forms in a new tab with this tool’s name filled in. No sign-in or email required. Feedback is optional.

About Barcode Generator (Code-128)

How Code-128 Packs Data Into Bars

Code-128 is a widely used 1D (linear) barcode symbology capable of encoding the full ASCII character set — letters, digits, and punctuation — using varying-width black bars and white spaces, unlike simpler numeric-only barcode formats. Each character maps to a specific pattern of bar/space widths, and a checksum digit is calculated and appended automatically, letting a scanner detect a misread or damaged barcode rather than silently returning wrong data.

Code-128's ability to encode full alphanumeric text (not just digits) is exactly why it's common for SKUs, tracking numbers, and internal asset labels where the encoded value isn't purely numeric — formats like UPC/EAN, by contrast, are fixed-length and numeric-only, designed specifically for retail product identification rather than general-purpose alphanumeric labeling.

A barcode's scannability depends heavily on contrast and print quality, not just correct encoding — a barcode printed too small, at low contrast, or on a reflective surface can fail to scan reliably even though the underlying encoded data is perfectly correct, which is worth testing with an actual scanner before relying on printed labels at any real scale.

Frequently asked questions

What can Code-128 encode that a purely numeric barcode format can't?

Full ASCII text — letters, digits, and punctuation — not just numbers, which is why it's commonly used for SKUs and asset tags with alphanumeric values, unlike numeric-only formats like standard UPC/EAN retail barcodes.

What does the checksum digit in a Code-128 barcode do?

It lets a scanner detect whether the barcode was misread or physically damaged — the scanner recomputes the checksum from the scanned data and compares it, rejecting a read that doesn't match rather than returning silently incorrect data.

Why might a correctly generated barcode fail to scan when printed?

Scannability depends on print contrast, size, and surface reflectivity, not just correct data encoding — a barcode printed too small or at low contrast can fail to scan reliably even with perfectly correct underlying data.

Have a suggestion for Barcode Generator (Code-128)?Share your feedback ↗