Code 128 Barcode Generator
Generate a Code 128 barcode from any text or number and download it as a PNG. Full ASCII, automatic subset switching, no signup and nothing uploaded.

Code 128 is the general-purpose linear barcode: it encodes all 128 ASCII characters at high density and is what almost every warehouse, asset and logistics scanner expects. Type a value and the encoder picks the most compact subset automatically, appends the modulo-103 check character, and renders a scannable PNG in your browser.
Runs entirely in your browser · no signup · nothing is uploaded · updated 2026-09-08
Symbology
Code 128
Any ASCII. The general-purpose default.
How to use it
- 1.Type the value you want encoded - letters, digits and punctuation are all valid.
- 2.The encoder picks subset A, B or C for you and adds the mandatory check character.
- 3.Download the PNG at 300 DPI or higher and print it without rescaling.
Code 128 subsets
You never pick a subset by hand. The encoder switches between them mid-code to keep the symbol as short as possible, which is why a run of digits takes half the width of the same run of letters.
| Subset | Encodes | Density | Chosen when |
|---|---|---|---|
| A | Uppercase, digits, punctuation, ASCII control codes | 1 char per symbol | The value contains control characters such as tab or newline |
| B | Upper and lowercase, digits, punctuation | 1 char per symbol | The default for mixed text |
| C | Digits only, in pairs | 2 digits per symbol | Four or more consecutive digits appear |
Frequently asked questions
What is Code 128 used for?
Anything internal: asset tags, warehouse locations, shipping references, work orders. It is not a retail symbology - a supermarket till expects EAN-13 or UPC-A - but for every barcode that never crosses a checkout, Code 128 is the default.
How many characters can Code 128 hold?
There is no fixed limit in the spec, but practice caps it around 20 to 25 characters. Past that the symbol gets too wide to scan in one pass and too wide to print on a normal label. If you need more, use a QR code.
Do I need to add a check digit?
No. Code 128 mandates a modulo-103 check character and it is computed and appended for you. Unlike EAN, it is not part of the human-readable text, so do not type one in.
What is the difference between Code 128 and GS1-128?
GS1-128 is Code 128 with rules on top: an FNC1 start character and standardised Application Identifiers that label each data field, such as (01) for a product number or (17) for an expiry date. The bars are identical; the meaning is not. This tool makes plain Code 128, so do not use it for a GS1-128 logistics label.
Why is Code 128 narrower than Code 39?
Subset C packs two digits into every symbol, and Code 128 uses variable-width bars where Code 39 uses a fixed wide/narrow pattern. On a numeric value Code 128 is typically half the width, which matters a lot on a small label.
Can Code 128 encode lowercase letters?
Yes, through subset B - that is one of its main advantages over Code 39, which is uppercase only. Case is preserved exactly, so scan-back into a case-sensitive system works.
How small can I print a Code 128 label?
Keep the narrowest bar at or above 0.25mm and leave a quiet zone of at least 10 narrow bars on both sides. A squeezed quiet zone is the single most common reason a correctly generated barcode will not scan.
Will every scanner read Code 128?
Effectively yes on modern hardware. Some very old laser scanners ship with Code 128 disabled in firmware and need it switched on in the configuration sheet, but nothing made in the last two decades struggles with it.
Tools that pair with this one
Percentage Calculator
Work out X% of Y, what percentage one number is of another, and percentage increase or decrease between two values.
Roman Numeral Converter
Convert numbers to roman numerals and roman numerals back to numbers, with validation that rejects malformed numerals like IIII.
Unit Converter
Convert between metric and imperial units for length, weight, volume, time, digital storage and temperature, with exact conversion factors.
Epoch Converter
Convert Unix timestamps to human-readable dates and back, handling both seconds and milliseconds, with UTC, ISO 8601 and local output.
Built something?
RankCert is a weekly launch board where products rank on domain control we verify ourselves - not upvotes. Listing is free and the link is dofollow whether or not you display our badge.