Barcode Generator (Code 128)
🔒 Runs in your browser
Enter text to generate a Code 128 barcode.
The result updates as you type. Download as vector SVG for crisp printing.
🔒 The barcode is generated entirely in your browser — nothing is sent to a server.
What Code 128 is
Code 128 is a compact, high-density linear (1D) barcode used across shipping labels, warehouse and inventory systems, product tickets and asset tags. This generator produces Code 128 B, the subset that covers the full printable ASCII range — uppercase and lowercase letters, digits, spaces and common punctuation — so it can encode SKUs, order numbers, serial codes and short references exactly as you type them. Each symbol is built from bars and spaces one to four modules wide, framed by a Start B pattern and a Stop pattern, with a mod-103 check symbol inserted automatically so scanners can verify the read.
Encoding and export
Everything runs in your browser: the text you enter is converted to the Code 128 module pattern, the check digit is calculated, and the result is drawn as crisp black bars over a white quiet zone. Toggle the human-readable caption on or off, pick a bar-width scale to suit your print size, then download as SVG — a vector file that stays razor-sharp at any size, ideal for labels and large-format printing — or copy the SVG markup straight into your own document or app. Give a scanner a clear quiet zone on both sides and enough contrast, and the code reads reliably.
Frequently asked questions
What is a Code 128 barcode?
Code 128 is a compact, high-density 1D barcode widely used for shipping labels, inventory, product tickets and asset tags. This tool generates the Code 128 B variant, which covers the full printable ASCII set, and adds the required mod-103 check symbol automatically.
Which characters can I encode?
Any printable ASCII character from space (code 32) to tilde (code 126): uppercase and lowercase letters, digits 0-9, spaces and common punctuation. Accented letters, emoji and control characters are outside Code 128 B and are rejected with a clear message.
Can I print the barcode, and will it scan?
Yes. Download it as an SVG vector file that stays sharp at any print size, or copy the SVG markup into your own layout. Keep a clear white quiet zone on both sides and good contrast, and any standard Code 128 scanner or phone app will read it.
Is my data uploaded anywhere?
No. The barcode is built entirely in your browser from the text you type — no server call, no storage. You can keep using it offline once the page has loaded.