Free Code 128 Barcode Generator
Code 128 encodes any ASCII text at high density — the default choice for internal labels, logistics and serial numbers.
Any text or numbers — the all-round workhorse.
Enter data to preview your barcode
Inventory & asset label examples
Click an example to load it into the generator above, then adjust it to your own numbering.
Inventory
Assets
Code 128 Barcode: Key Facts
- Encodes numbers, letters and supported special characters
- Commonly used for inventory, shipping labels and asset tracking
- Includes a mandatory symbol check character to help detect scanning errors
What Is a Code 128 Barcode?
Code 128 is a high-density, one-dimensional (1D) barcode used to encode text and numbers in a compact, machine-readable format. Unlike retail-specific barcode types such as UPC-A and EAN-13, Code 128 is particularly useful for internal business identifiers.
You will commonly find Code 128 barcodes on warehouse shelves, shipping labels, inventory items, equipment tags and serial-number labels.
Its main advantage is flexibility. A Code 128 barcode can represent letters, digits and supported control characters, making it suitable for identifiers such as INV-2026-0018 or BOX-004582.
Code 128 uses three character sets, known as A, B and C. Character set C efficiently represents pairs of numeric digits, helping reduce the width of numeric barcodes.
The symbol also contains a mandatory check character, which helps detect decoding errors.
How to Generate a Code 128 Barcode Online
Creating a Code 128 barcode with Barcodra takes only a few steps:
Enter or paste the text you want to encode in the generator above.
Check the barcode preview to confirm that the data is correct.
Adjust the available display settings, such as bar height or visible text.
Download the barcode as PNG, SVG or PDF.
Print a sample label and test it using a compatible barcode scanner.
Example: Enter INV-2026-0018 to generate a barcode for an internal inventory reference.
Use PNG when you need a bitmap image for documents or simple layouts. Choose SVG when you need scalable vector artwork, or PDF when preparing a print-ready file.
For reliable scanning, leave clear white space on both sides of the barcode. Avoid stretching the image disproportionately or printing it with insufficient contrast.
Where Are Code 128 Barcodes Used?
Inventory management: Assign internal barcode labels to products, storage bins and stock locations. Scanning the label can reduce manual entry errors when paired with inventory software.
Warehouse operations: Identify shelving positions, picking locations and internal handling units.
Shipping and logistics: Encode package references and tracking identifiers where the shipping workflow specifies Code 128. Some carriers require their own barcode layouts or data specifications, so check the applicable requirements.
Asset tracking: Label equipment, tools and reusable containers with unique internal IDs.
Serial numbers: Convert existing alphanumeric serial-number values into scannable labels.
If you need to create a series of unique identifiers before generating barcodes, try the free SKU and serial number generator.
Code 128 vs Code 39 vs GS1-128
Code 128 and Code 39 are both linear barcode formats, but they differ in how efficiently they encode information.
Code 128 supports a broad selection of characters and is generally more compact for comparable data.
Code 39 is a simpler, older symbology often used in industrial applications. Standard Code 39 supports a more limited character set.
GS1-128 uses Code 128 as its underlying symbology but follows additional GS1 rules for structured business information, including Application Identifiers.
For example, a GS1-128 barcode may encode a product GTIN together with batch or expiry information. Simply generating an ordinary Code 128 barcode with similar-looking text does not make it a compliant GS1-128 symbol.
Use our Code 39 barcode generator for Code 39 labels or the GS1-128 barcode generator when your application requires structured GS1 data.
How to Print Code 128 Barcodes That Scan Reliably
A valid barcode image can still fail to scan if it is printed poorly.
Before printing a large batch of labels, check the following:
Contrast: Use dark bars against a clean, light background. Black on white is a reliable starting point.
Quiet zones: Keep sufficient empty space before and after the barcode.
Print quality: Avoid blurred edges, broken bars and smudged ink.
Scaling: Preserve the barcode's proportions. Do not stretch it to fill an unsuitable label size.
Scanner compatibility: Confirm that your scanning device supports Code 128.
Sample testing: Scan a finished label under actual working conditions before mass printing.
For more practical advice, read our guide to printing barcode labels that scan correctly.
Important: Code 128 is a barcode format, not a product-number registration service. Generating a barcode does not assign a GS1 product identifier or register your business with a retailer.
Frequently asked questions
Is the Code 128 barcode generator free?
Yes. You can create Code 128 barcode images using BarCodra's online generator without installing barcode software or creating an account
Can Code 128 contain letters and numbers?
Yes. Code 128 can encode uppercase and lowercase letters, digits and supported special characters. This makes it useful for identifiers such as inventory references and serial numbers.
What is the difference between Code 128 and GS1-128?
Code 128 is a general-purpose barcode symbology. GS1-128 is based on Code 128 but uses GS1 Application Identifiers and additional encoding rules for structured supply-chain information.
Why is my Code 128 barcode not scanning?
Common causes include insufficient quiet zones, poor contrast, low print quality, incorrect scaling or scanner settings. Verify the data and test a properly printed sample using a compatible scanner.
Is Code 128 suitable for retail product barcodes?
Code 128 is useful for internal business labels, but retail checkout applications commonly use UPC-A or EAN-13 to represent assigned GTINs. Use the barcode format required by your retailer or trading partner.
Code 128 data is validated before rendering. Generating an image encodes a number you already own — it does not license or register identifiers with GS1 or any ISBN agency.