Make a Code 128 barcode
Letters, digits and punctuation in one compact barcode, with no check digit for you to work out.
- Nothing is uploaded
- Works offline after first visit
- Open source
- No watermark, no sign-up
Make a Code 128 barcode from any text or numbers, for labels, inventory and shipping. It is free, and what you type is not uploaded: everything runs in your browser on your device. The barcodes are drawn on this page, and after one visit and a short wait the page works offline.
Size, colours and options
Type above and the barcode appears here.
Done
Open the network tab. Your files never appear in it.
Add files and run the tool to see every request this tab makes.
Your files are processed on this device and never sent to a server. Reload the page to clear everything from memory.
Code 128 holds letters, digits and punctuation in one compact barcode, which is why it is a common choice for inventory labels, shelf and bin tags, order numbers and shipping labels. It is the type to pick when no one has told you otherwise.
It works by switching between three character sets. Set B holds capitals, lowercase letters, digits and punctuation, set A holds capitals, digits and control characters, and set C packs two digits into every bar character, so a long run of digits comes out much narrower. This page picks the sets for you and switches inside the barcode where that makes it shorter.
The type also adds its own checksum character, and the scanner checks it and does not pass it on, so you have nothing to calculate and nothing extra appears in the scanned text.
What Code 128 can hold here
- Printable ASCII characters: A–Z, a–z, 0–9, space and punctuation. Case is kept, so ab and AB are different barcodes.
- Up to 80 characters on this page. The type itself has no fixed limit, but a longer barcode gets too wide to print or scan comfortably.
- Not accented letters, emoji or non-Latin text. This page does not use the type’s extended character options.
Code 128 and GS1-128
- GS1-128 is Code 128 with a special first character and a defined structure of numbered data fields, used on supply-chain labels. This page draws plain Code 128, so a scanner reads exactly the text you typed.
How it works
- Type your text or number. Capitals, lowercase, digits, spaces and punctuation are all fine.
- Watch the width. A longer text makes a wider barcode; digits take half the room.
- Save a PNG, SVG or PDF and test-scan a printed copy.
In your browser, not on a server
JsBarcode (MIT), a small open-source library, turns your number or text into the pattern of bars in this page. The page first checks the number against the rules of the type you chose and works out the check digit itself. The PNG is painted on a canvas by your browser, the SVG is written as plain rectangles, and the PDF is made by pdf-lib (MIT) in the tab.
Compared with upload-based tools: The number you type may be an unreleased product or an internal asset ID. Here the barcode is drawn on your device, so the number never leaves it.
Verify it yourself. Give the page a short while after one visit to save itself for offline use, then turn off Wi-Fi or switch to airplane mode and run the tool again. Or open your browser's developer tools (F12, or Cmd-Option-I on a Mac), pick the Network tab, and watch it while you convert. The panel above does the same count for you.
Questions
Does a Code 128 barcode need a check digit?
It has one built in, and the page adds it. Unlike UPC or EAN, you never type it, and it does not show in the printed text or the scanned result.
Why is my barcode so wide?
Every character takes the same room, so a long text makes a long barcode. Digits in a run are packed in pairs and take half as much room. Shorten the text, use a smaller bar width, or put the long part in a lookup instead of the barcode.
Does case matter?
Yes. Code 128 keeps capitals and lowercase letters as typed, so a scanner that reads order-a1 reports order-a1, not ORDER-A1. Code 39 is capitals only.
Will my scanner read it?
Code 128 is one of the most widely supported types, and most barcode scanners and scanner apps read it. A very old or specialised scanner may have it switched off, in which case its settings or manual list the types it reads.
Is what I type uploaded anywhere?
No. The barcode is drawn by code running in this page, so the number or text you type stays on your device. After your first visit and a short wait you can turn off your internet connection and it still works.
More image tools
Barcode generator
Type a number or text, pick the barcode type, and save the barcode as an image or a PDF. It is drawn on this page.
Photo to sketch
Pencil, charcoal or coloured pencil from any photo, previewed live and drawn on this device.
Add border to image
A clean frame and rounded corners for photos, screenshots and product shots, made on this device.
Black and white photo
Grayscale, high contrast, two-tone or sepia, previewed live and made on this device.
Other conversions
- JPG to GIF
- JPG to TIFF
- PNG to TIFF
- ICO to PNG
- HEIC to PNG
- HEIF to JPG
- PNG to JPG
- JPG to PNG
- WebP to PNG
- WebP to JPG
- UPC barcode generator
- Code 39 barcode generator
- ISBN barcode generator
- ITF-14 barcode generator
- EAN-13 barcode generator
- Photo to pencil sketch
- Round image corners
- Twitch sub badge resizer
- Discord emoji resizer
- Discord sticker resizer
- Resize for Instagram
- Pixelate image