Home › Utilities › Barcode Generator

Free Barcode Generator

Generate a real, scannable CODE128 barcode from any text or numbers — download as PNG instantly.

✅ Free📊 CODE128⚡ Instant

Enter Text or Numbers

Frequently Asked Questions

What is CODE128 barcode format?

CODE128 is a widely used, high-density barcode format that can encode all 128 ASCII characters, commonly used in shipping, packaging, and inventory management.

Can these barcodes be scanned by real scanners?

Yes, this tool generates standard-compliant CODE128 barcodes with correct checksums, readable by any standard barcode scanner or scanning app.

What characters can I encode?

This tool supports standard ASCII characters (letters, numbers, and common symbols) in the CODE128 Subset B character set.

How to Use the Barcode Generator

1. Type your text or numbers Enter the product code, SKU, tracking number, or any text you want encoded into the input field.
2. Adjust bar width and height Use the sliders to set how thick each bar is and how tall the barcode appears, depending on your label size or printing needs.
3. Click Generate Barcode The tool encodes your text into CODE128 Subset B, calculates the checksum, and renders the barcode onto a canvas.
4. Download the PNG Click Download PNG to save the generated barcode image for printing on labels or embedding in documents.

Generate CODE128 Barcodes Online

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.

What Is CODE128?

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.

How This Tool Generates a Valid Barcode

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.

Common Uses for Barcodes

Privacy and Local Processing

All barcode generation happens directly in your browser using Canvas rendering — your input text is never sent to a server.

Understanding CODE128 Subset B

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.

How the Checksum Prevents Misreads

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.

Why This Produces a Scannable Barcode, Not Just an Image

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.

Choosing Bar Width and Height

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.

For Small Business and Inventory Use

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.

Supported and Unsupported Characters

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.

Frequently Searched Terms

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 vs. Other Barcode Formats

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.

Printing Tips for Reliable Scans

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.

Popular Searches

barcode generator barcode generator online code128 generator free barcode maker generate barcode from text