Code 128 Barcode Generator
Code 128 is a dense, general-purpose 1D (linear, striped) barcode format that can encode the full ASCII character set — letters, digits, and punctuation — in a single compact symbol. That flexibility makes it a go-to choice for shipping and logistics labels, inventory tags, and internal tracking numbers where you need more than just digits. This tool encodes any text or data you give it into a Code 128 barcode — enter your content below, preview it live, and download it as a PNG or SVG. Need the specific format printed on retail packaging instead? Try the UPC/EAN Barcode Generator. Once you've generated a code, scan the result afterward to confirm it decodes correctly with the 2D Barcode Reader. And if you need a whole batch of labels at once, the Batch Barcode Generator can generate and zip up many at a time.
Barcode Content
0 characters
Enter some content above to preview your barcode
How to Use
- Type or paste the text or data you want to encode into the Content box.
- Check Include human-readable text if you want the raw content printed underneath the barcode as well.
- Watch the preview update automatically as you type.
- Choose a Download Scale — larger scales produce a bigger image, useful for printing.
- Download as a PNG for most uses, or an SVG if you need to resize it for large printing without losing quality.
- Before printing in bulk, test-scan the result with the 2D Barcode Reader to confirm it decodes correctly.
What Is Code 128?
Code 128 is one of the most space-efficient 1D barcode formats around — it packs more characters into a given width than most other linear formats, which is part of why it's so widely used on labels where space is tight. It can encode the entire ASCII character set, including letters, digits, and punctuation, not just numbers.
Internally, Code 128 has three character sets — A, B, and C — and it automatically switches between them as needed to represent your content in the most compact way possible. It also includes a built-in checksum calculated automatically from the encoded data, so unlike UPC or EAN barcodes, there's no separate check digit for you to add or verify — the barcode handles it for you.
Common Uses
Shipping and logistics — Code 128 is the standard underlying format for GS1-128 style shipping and pallet labels used throughout supply chains.
Inventory and asset tags — its ability to encode letters and numbers together makes it a natural fit for warehouse and asset tracking labels.
Internal serial numbers — many organizations use Code 128 for internal tracking numbers, work orders, and ID badges where a compact, flexible barcode is needed.
Frequently Asked Questions
What is Code 128 used for?
Code 128 is used for shipping and logistics labels, inventory and asset tags, and internal serial numbers — anywhere a compact barcode needs to encode letters, numbers, and symbols together.
Does it include its own check digit?
Yes. Unlike UPC, EAN, or ITF-14, Code 128 calculates and embeds its checksum automatically as part of encoding — there's nothing for you to add or verify separately.
Is there a data limit?
There's no hard limit like some 2D formats impose, but very long content produces a wider barcode. Keep your content reasonably short if it's meant to be printed on a label and scanned quickly.
Can I include human-readable text under the barcode?
Yes. Check the Include human-readable text below the barcode box above the preview to print your content beneath the barcode itself.
Is my data uploaded anywhere?
No. Everything is generated locally in your browser — your content is never uploaded or sent to a server.