Free Code 128 Barcode Generator
Create a Code 128 barcode in seconds. Download SVG, PDF or PNG. No signup, no watermark.
Any ASCII characters. Most versatile barcode.
Customize
Preview
Enter data to see preview
The picker above also holds UPC-A, UPC-E, EAN-13, EAN-8, Code 39, Code 93, ITF-14, Interleaved 2 of 5 and Codabar, plus four 2D symbologies. All fourteen live on the barcode generator.
How it works
Code Sets A, B and C, and Why C Halves Your Label
Code 128 is not one alphabet but three, and the encoder moves between them mid-barcode. That is the whole trick behind its density, and it is worth two minutes of your time because it changes how you should number your own things.
Set A
ASCII 0 to 95 — control codes, digits, capitals and punctuation. No lowercase. It is the set you land in when your data is uppercase and needs a control character.
Set B
ASCII 32 to 127 — the same, plus lowercase, minus the control codes. This is where most human-readable payloads end up: a mixed-case asset tag, a location code, a short reference.
Set C
Digits only, and two of them per symbol character. That single fact is why a numeric Code 128 is about half the width of the same number of letters.
You do not pick between them here, and there is no manual A/B/C control in the generator above. The encoder starts in Set C when your value opens with two or more digits, otherwise chooses A or B by whichever alphabet matches the longer opening run, and drops into C part-way through only when a run of at least four digits makes the switch worth the character it costs to change sets. The barcode is drawn in your browser as you type — nothing you enter is sent anywhere to be encoded. If you want the wider comparison against QR and the 2D symbologies, that lives on our QR code vs barcode comparison.
The arithmetic, since Code 128 lets you do it
Every symbol character in a Code 128 is eleven modules wide — three bars and three spaces — and the stop pattern is thirteen. Add the start character, the check character and ten clear modules on each side and the finished width is fully determined before you print anything.
48 characters of mixed text
48 symbol characters → 583 modules with quiet zones → roughly 146 mm wide at a 0.25 mm module.
48 digits, encoded in Set C
24 symbol characters → 319 modules with quiet zones → roughly 80 mm. Same data, barely more than half the label.
If you control the format of your own serials, container IDs or bin locations, making them all-numeric with an even digit count is the cheapest width saving available to you. It costs nothing and it is invisible to everyone downstream.
Specs
What This Code 128 Generator Does, Exactly
Including the limits. A tool that only lists what it can do is harder to plan a label run around than one that tells you where it stops.
| Property | Value | Notes |
|---|---|---|
| Symbology | Code 128 (ISO/IEC 15417) | The auto-subset variant: Code Set A, B and C are selected by the encoder, not by you. |
| Character set | Standard ASCII (U+0000–U+007F) | Letters in either case, digits, spaces and punctuation. Anything above U+007F is refused, not mangled. |
| Case handling | Exactly as typed | Nothing is auto-uppercased — unlike Code 39 and Code 93, which have no lowercase alphabet at all. |
| Input length here | Up to 48 characters | A limit of this page’s single-line field. ISO/IEC 15417 sets no character limit on Code 128 at all. |
| Check character | Modulo 103, added automatically | You never type it, and it is not printed in the human-readable line under the bars. |
| Symbol width | 11 modules per character | Plus a start character, the check character, a 13-module stop pattern and the quiet zones. Width is arithmetic, not a guess. |
| Quiet zone | 10 modules left and right | The ISO/IEC 15417 minimum, drawn into the exported file. Never crop tighter than this. |
| Smallest module we advise | 0.25 mm | A general printing guideline, not a requirement of the standard — Code 128 runs in closed systems whose scanners vary. |
| Export formats | PNG, SVG, PDF | SVG and PDF are genuine vector. There is no EPS export. |
| Raster resolution | 72, 150, 300 or 600 DPI | Paired with a target print width in mm, inches or pixels. Ceiling of 10,000 pixels per axis. |
| Design controls | Bar colour, background, bar width, height, text line | That is the whole list. No logo, no gradient, no frame. |
| Batch size | Up to 500 barcodes at once | A browser-memory cap, identical for everyone. Signing in does not raise it. |
| Code type | Static | The data lives in the bars. No redirects, no scan counts, no editing after download. |
| GS1-128 / EAN-128 | Not generated | Plain Code 128 only. FNC1 sits above U+007F, which our ASCII check refuses, and GS1 mode is never enabled. |
Not on the list, and deliberately: GS1-128, for the FNC1 reason set out below. There is also no Code 128 font, no Excel add-in, no barcode API and no decoding — this page creates barcodes, it does not read them.
Honest limits
Where This Tool Is Stricter Than the Standard
Two places, and both are worth knowing before you build a label around them. Neither is a bug, and neither is what ISO/IEC 15417 says.
48 characters is our limit, not Code 128’s
Code 128 is variable-length and the standard fixes no character count. The practical ceiling in the real world is how wide a symbol your printer can lay down and your scanner can read in one pass. The field on this page accepts up to 48 characters, which is a limit of a single-line input rather than anything in the symbology — and a 48-character Code 128 is already a 146 mm label at a 0.25 mm module.
If your payload is genuinely longer than that, say so to yourself early: a linear barcode is the wrong shape for it, and a Data Matrix will carry it in a fraction of the area.
Non-ASCII input is refused, not mangled
Type caféand the generator will not encode it. Code 128’s alphabets are defined over ASCII, and an accented or non-Latin character has no defined place in them — encoding it anyway would produce a label that prints perfectly and scans back as something you never typed. Refusing beats that, so anything above U+007F is rejected at the input with a message naming the cause.
Everything inside ASCII encodes exactly as typed, in either case, with no folding. If you need accented or non-Latin text in a scannable code, use a text QR code instead — QR handles UTF-8 and phone cameras read it.
And one thing we do not generate at all: GS1-128. GS1-128 — older documents call it EAN-128 — is Code 128 with a rule set on top: it opens with an FNC1 character declaring the payload to be GS1 element strings, written as application identifiers and values. This generator produces plain Code 128 only. FNC1 is not a character you can type, our ASCII check refuses it, and the encoder’s GS1 mode is never switched on. If a customer specification says GS1-128, this is not the tool for that label. For GS1 element strings in a 2D symbol we do support GS1 DataMatrix.
Choosing
Code 128 Is the Default — Except at a Checkout
The rule is simpler than most symbology guides make it. If an outside standard tells you which barcode to print, print that one. If nobody is telling you, Code 128 is the answer, because it is the densest linear symbology that takes the full ASCII set at any length.
Reach for Code 128
- Shipping and courier labels, and the carton and pallet IDs that go with them.
- Warehouse work: tote IDs, bin and shelf locations, pick lists, put-away labels.
- Asset tags, IT inventory, tool cribs and equipment registers.
- Work-in-progress travellers, job tickets and route cards on a production floor.
- Anywhere the data is yours to define and both ends of the scan are inside your own operation.
Do not reach for Code 128
- Retail point of sale. A checkout runs on UPC-A in the United States and Canada and EAN-13 elsewhere, with UPC-E and EAN-8 for small packs. Those carry a GTIN licensed through GS1, and a till will not accept a Code 128 in their place. Both formats are in the picker above; the number itself has to come from GS1, because QRKIT draws symbols and does not issue GTINs.
- Outer cases in a retail supply chain. That is normally ITF-14, which is also in the picker.
- A tiny part or a crowded label. A linear barcode only grows sideways. When there is no width left, a 2D symbol is the answer — see Data Matrix or Aztec.
- Anything a customer will scan with a phone. Phone cameras recognise QR codes, not Code 128.
What about Code 39? It is the older alternative, and it is still specified in some defence and automotive standards, so print it when you are told to. Outside those, Code 128 beats it on every axis that matters: Code 39 has 43 characters and no lowercase, its check character is optional and usually skipped, and it needs roughly twice the width for the same data. If nothing is forcing your hand, this is the page you want. If something is, the Code 39 barcode generator is the one you want instead.
Output
Vector SVG and PDF, at the Size You Will Actually Print
Most free Code 128 tools hand you a PNG and leave the sizing to you. This one exports genuine vector and lets you state the finished dimensions up front.
SVG
Real geometry written into the file, not a traced bitmap. Opens in Illustrator, Inkscape, CAD and label software, and scales to any size without softening an edge.
Also true vector — the barcode is redrawn with the PDF's own drawing primitives onto a page sized to the symbol, rather than an embedded image, so it stays sharp at press resolution.
PNG
The raster option, at 72, 150, 300 or 600 DPI. Fine for screens and office printers; reach for SVG or PDF when the file is going to a plate or a thermal transfer die.
Set the width, not a guess
Enter a target print width in millimetres, inches or pixels. The export is generated at exactly that size, so nothing has to be scaled up in another program afterwards. The one ceiling is 10,000 pixels per axis, and the tool tells you on screen if a request runs into it.
A module-width warning that means something
The tool works out how wide one module will be at your chosen size and warns you below 0.25 mm. That is printing guidance rather than a rule of the standard — Code 128 lives in closed systems — but it is the number a thermal printer at 203 DPI runs into first.
Quiet zone included
Ten clear modules on the left and ten on the right, the ISO/IEC 15417 minimum, drawn into the file. This is the single most commonly broken rule on a Code 128 label: do not crop tight to the bars, and do not butt the symbol against a box edge or a fold.
What we do not do: we draw the barcode and export the file. Print quality on the finished label — contrast, bar edge sharpness, ink spread, and grading against a print-quality verification standard — depends on your printer, ribbon and stock, and is not something QRKIT measures, grades or certifies. Bar height is yours to choose too, and taller is more forgiving of a fast handheld pass. Test a real printed sample with the scanner that will read it before committing to a run.
In bulk
500 Code 128 Barcodes From One Paste
Open Generate many at once underneath the generator, paste a column of serials, SKUs or location codes or upload a CSV, and take the whole run in one download. No account, no upgrade prompt.
Commas are treated as data
This matters more for Code 128 than for any other format, because its data legitimately contains commas. A pasted list is read as one value per line, not split on commas — unless the input is tab-separated or has a header row saying which column holds the codes, and that choice is shown to you and can be changed.
Three outputs
A ZIP of PNGs, a ZIP of SVGs, or a single PDF with one barcode per page. Files are numbered in input order, so the archive sorts back the way your list was written.
Nothing fails quietly
Every row runs through the same checks as the single-code field. Invalid rows are listed with their row numbers and left out of the download rather than silently producing a broken label.
About the 500-row cap. It is a browser-memory limit and nothing else — the batch is rendered on your own machine, and 500 barcodes at 300 DPI is already tens of megabytes held in memory. It is the same number for everyone, there is no account or plan that raises it, and when it bites the tool tells you exactly how many rows were left out so you can split the list and run the rest.
Step by step
How to Create a Code 128 Barcode
Step 1
Type the data
A serial number, a carton ID, a bin location, an asset tag. The generator above is already set to Code 128 and draws the barcode as you type. Standard ASCII, either case, up to 48 characters in this field.
Step 2
Let the encoder pick the subset
Code Set A, B or C is chosen for you and switched mid-string where it saves width. Nothing to configure — and if your value is all digits you get Set C and roughly half the label for free.
Step 3
Set the print size
Give it a target width in mm, inches or pixels, and pick 72–600 DPI for raster output. The tool reports the finished size and warns if one module falls under 0.25 mm. Bar height and the human-readable text line are yours to set too.
Step 4
Download
SVG or PDF for anything that will be printed or scaled; PNG for screens. The ten-module quiet zone is already in the file. No signup, no account, no watermark, and the barcode is yours to use commercially.
Reading one back is a different job. A phone’s built-in camera app recognises QR codes but does not read Code 128, so you will need a laser or imaging scanner, or a scanner app that lists the symbology. QRKIT generates Code 128 barcodes; it does not decode them.
Pricing
Free, and Free in the Way You Meant
“Free” usually turns out to mean free to preview. Here it means what it says: the Code 128 generator on this page asks for no account to create a barcode and no account to download the file, stamps nothing on the output, and has no paid tier above it.
Included, at no cost
Free forever- Code 128 with automatic A/B/C subset selection
- Modulo-103 check character computed for you
- Unlimited barcodes — no daily quota
- PNG, SVG and vector PDF download
- Print width in mm/in/px and 72–600 DPI
- Bulk generation up to 500 at a time
- No signup, no account, no card
- No watermark on any export
- Commercial use allowed
Not available at any price
Be clear about it- No dynamic or trackable barcode. Every Code 128 here is static, so it cannot be edited after printing and its scans cannot be counted.
- No GS1-128 or EAN-128. Plain Code 128 only, for the reasons above.
- No barcode API or integration. No REST endpoint, no Zapier, no plugin, no font, no library.
- No decoding. This page generates Code 128 barcodes; it does not read them.
Need a code you can change or measure instead? That is what a dynamic QR code is for — edit the destination after printing, and see scan counts. It is a different symbology and a different product, and unlike the barcode tool it involves an account. Learn about dynamic QR codes.
Code 128 Barcode Generator — Frequently Asked Questions
Get started
Generate Your Code 128 Barcode
Full ASCII, subsets and check character handled for you, drawn in your browser and exported as vector SVG, PDF or PNG at the size you will print it. No signup, no watermark.
