Code 128 barcode generator
Turn text into a scannable Code 128 barcode, rendered as copyable SVG.
Code 128 barcode generator
Paste any text and this tool encodes it as a Code 128 barcode — the linear symbology used on shipping labels, inventory tags, retail price tickets and ID badges — and renders it as SVG you can copy straight into a document, label template or print layout. The checksum is calculated automatically, so the code you get is ready to scan.
Character set controls how each character is packed into the code. Automatic switches between set B (letters, digits and punctuation) and set C (pairs of digits, twice as dense) whenever a run of four or more digits shows up, which is how most real-world barcodes stay short. You can also force set A, B or C directly — set A adds control characters at the cost of lowercase letters, and set C only accepts an even number of digits. Bar height, the width of the narrowest module and the quiet zone (the blank margin a scanner needs on each side) are all adjustable, and you can toggle the human-readable text printed under the bars.
Turn on batch mode to generate one barcode per line of input — useful for a whole list of SKUs or serial numbers in one pass. Text longer than 2,000 characters per line is rejected with a clear message rather than producing a code too dense to scan reliably; characters outside the ASCII range (accented letters, emoji) aren't supported by Code 128 itself, so those are flagged too.
Everything runs locally in your browser — the text you enter, and the barcode generated from it, never leave your device. Copy the SVG markup, download it as a .txt file, or send the output back into the input to tweak it further.