Generate a real, scannable CODE128 barcode from any text or numbers — download as PNG instantly.
CODE128 is a widely used, high-density barcode format that can encode all 128 ASCII characters, commonly used in shipping, packaging, and inventory management.
Yes, this tool generates standard-compliant CODE128 barcodes with correct checksums, readable by any standard barcode scanner or scanning app.
This tool supports standard ASCII characters (letters, numbers, and common symbols) in the CODE128 Subset B character set.
This tool generates real, scannable CODE128 barcodes from any text or number sequence, using the standard CODE128 Subset B encoding table with a correctly calculated checksum, rendered as a downloadable PNG image.
CODE128 is one of the most widely used linear barcode formats, capable of encoding the full ASCII character set (letters, numbers, and symbols) at high density. It's commonly found on shipping labels, product packaging, and inventory tags because of its compactness and reliability. Unlike simpler formats like Code39, CODE128 includes a mandatory checksum digit calculated from the encoded data, which helps scanners detect and reject misread barcodes.
Each character you enter is mapped to a numeric value according to the CODE128 Subset B standard, and a checksum is calculated by summing each value multiplied by its position, then taking the result modulo 103 — exactly as the CODE128 specification requires. This checksum value is appended to the encoded sequence, along with mandatory start and stop patterns, ensuring the resulting barcode is standard-compliant and readable by any real barcode scanner, not just a visual approximation.
All barcode generation happens directly in your browser using Canvas rendering — your input text is never sent to a server.
CODE128 actually has three subsets (A, B, and C) optimized for different kinds of data — Subset C packs pairs of digits for very dense numeric encoding, while Subset A and B cover the full printable ASCII range with different control-character support. This tool uses Subset B, which covers all standard uppercase and lowercase letters, digits, and common punctuation (ASCII values 32 through 126), making it the right choice for general-purpose alphanumeric codes like product SKUs, names, and mixed-format reference numbers rather than purely long numeric strings.
Every valid CODE128 barcode includes a checksum character calculated from the data it encodes, which this tool computes by taking the start code's value, adding each subsequent character's value multiplied by its position in the sequence, and reducing the total modulo 103. A scanner recalculates this same checksum from what it reads and compares it to the checksum encoded in the barcode — if they don't match, the scanner rejects the read instead of reporting incorrect data, which is why a correctly calculated checksum (as this tool produces) matters for real-world reliability, not just visual appearance.
A barcode isn't just black and white stripes arranged to look right — each character maps to one of 107 precise 11-bit bar-and-space patterns defined by the CODE128 specification, and the sequence must begin with a valid start pattern and end with the standard stop pattern for a scanner to recognize it at all. This tool looks up each encoded value in the official CODE128 pattern table and renders bars pixel-for-pixel according to that pattern, rather than generating a barcode-like image that only resembles a real one — meaning the output can be scanned by real hardware and scanning apps, not just displayed for visual reference.
Bar width controls how many pixels wide each unit bar is — thinner bars make a more compact barcode but require a higher-resolution scanner or printer to read reliably, while thicker bars are more forgiving for lower-quality printing or phone camera scanning but produce a wider image. Height is mostly a readability and aesthetic choice, since CODE128 is a 1D (linear) format read horizontally, though taller bars do make it easier for a handheld scanner to get a clean read if the scan angle isn't perfectly level.
Small shops and warehouses that need a handful of barcodes for internal product or bin labeling — without paying for commercial barcode software or a subscription service — can generate exactly the codes they need here and print them directly onto label sheets. Since each character you type maps predictably to the encoded result, the same input text will always generate the identical barcode, which matters if you need to regenerate a lost label and have it still match your existing inventory records.
CODE128 Subset B as implemented here supports standard printable ASCII characters — uppercase and lowercase letters, digits 0-9, spaces, and common punctuation and symbols found on a standard keyboard. Characters outside this printable range (such as extended Unicode characters, emoji, or certain control characters) aren't supported and will produce an error message naming the specific unsupported character, so you can adjust your input rather than getting a silently broken barcode.
This tool is commonly found through searches like "barcode generator online free," "code128 barcode maker," "generate barcode from text free," "scannable barcode generator," and "download barcode png." It produces standard-compliant, scanner-readable CODE128 barcodes with no account or software installation required.
CODE128 is denser than older formats like Code39, meaning it can encode the same data in a shorter physical length, which matters when label space is limited. It differs from UPC/EAN formats used on retail packaging, which are fixed-length numeric codes tied to a product registration system (GS1) rather than arbitrary text — CODE128 is the better fit for internal reference codes, tracking numbers, and asset tags where you control both the encoding and the scanning, rather than for retail point-of-sale barcodes that need to match a registered product number.
For a barcode to scan reliably when printed, it needs a clear quiet zone (blank space) on either side — this tool automatically adds that margin around the generated bars. When printing, avoid scaling the image in a way that blurs the bar edges, and test a printed label with an actual scanner or a phone scanning app before producing a full batch, since printer resolution and paper quality can affect how cleanly thin bars reproduce.