Code 128 Barcode Generator
Code 128 is the barcode most people reach for when they need letters, numbers and symbols in one small label. Type your text below, check the preview, then download or print it.
Letters, numbers and standard symbols. Up to 80 characters.
Your barcode will appear here.
Your barcode data is processed in your browser and is not uploaded to our server.
Size and appearance
The blank margin (quiet zone) is never smaller than 10 times the bar width, so the barcode stays scannable.
Code 128 at a glance
| Characters | All 128 ASCII characters (this generator accepts printable characters, ASCII 32–126) |
|---|---|
| Length | Variable. Longer text makes a wider barcode |
| Check character | Built in and added automatically |
| Typical use | Shipping labels, logistics, inventory and asset tags |
What you can enter
- Letters (upper and lower case), digits, spaces and common symbols
- Up to 80 characters in this generator
- Upper and lower case are different:
abcandABCgive different barcodes - You do not type the check character; it is added for you
What is Code 128?
Code 128 stores your text as a pattern of bars and spaces of different widths. It can hold the whole ASCII character set and squeezes data in tightly, which is why it turned into the everyday format for warehouses, shipping and internal labels.
Behind the scenes it uses three character sets: one suited to capital letters and control characters, one to lower-case letters, and one to pairs of digits. A good encoder switches between them automatically, so a long run of numbers produces a much shorter barcode than the same digits would in many other formats.
Where Code 128 is used
- Shipping and parcel labels, including GS1-128 labels, which are built on Code 128
- Warehouse shelf locations, bins and pallet tags
- Inventory and asset tags, like the sticker on a company laptop
- Reference numbers on documents, lab samples and returns slips
When to choose Code 128
Go with Code 128 if you need more than digits, if you want a long number to take up less room, or if your scanner or software already expects it. For labelling your own stock, it's a safe default.
One thing it's not for: products sold in shops. Checkouts expect an EAN-13 or UPC-A there. And if all you have is digits and you're labelling cartons, have a look at ITF-14.
Advantages
- Handles letters, digits and symbols in one format
- Compact for numeric data
- Built-in error detection
Limitations
- Not accepted for retail product barcodes
- Very long text makes a wide barcode that's awkward to print and scan
How to create a Code 128 barcode
- Enter your data in the box above, for example
ABC-12345. - Check the preview and read any message under the box. It explains how to fix invalid input.
- Adjust the bar width, height or margin under “Size and appearance” if you need to.
- Select Download PNG, Download SVG or Print. Files are named
code-128-barcode.pngandcode-128-barcode.svg.
Prefer another format? Return to the barcode generator to choose a different type.
Code 128 questions
Is Code 128 case sensitive?
Yes. A scanner gives back exactly what was encoded, so “abc” and “ABC” make two different barcodes.
How many characters can I use?
There's no hard limit in the format, but every extra character makes the barcode wider. This generator stops at 80. If it won't fit your label, shorten the text or reduce the bar width.
Why does my numeric Code 128 barcode look shorter than the same number in Code 39?
Code 128 packs two digits into a single symbol, so a long number takes about half the room it would in Code 39.
Do I have to type a check digit?
No, you don't have to. Code 128 has its own check character and the generator adds it for you.
Related tools
- Barcode GeneratorCreate, preview and download barcodes in seven formats.
- Code 39 GeneratorSimple letters-and-numbers barcode for industrial labels.
- EAN-13 GeneratorThe standard 13-digit barcode for retail products.
- ITF-14 Generator14-digit barcode for cartons, cases and shipping packaging.
- QR Code Generator GeneratorCustom QR codes for links, Wi-Fi, contacts and more, with colours, logos and stickers.