How to use this barcode generator
- Type any text or number into the input — letters, digits, spaces and common punctuation are all supported.
- The Code 128 barcode redraws instantly as you type, so you always see the final result.
- Toggle Show text to display or hide the human-readable label under the bars.
- Click Download PNG to save a high-resolution image ready for labels, packaging or documents.
What is Code 128?
Code 128 is a high-density linear barcode symbology used worldwide in shipping, logistics, inventory and retail (for example on GS1-128 shipping labels). It can encode all 128 ASCII characters and uses a built-in checksum digit, so scanners can verify the read is correct. Each character is drawn as a pattern of bars and spaces measured in modules — this tool implements Code 128 subset B, which covers the full printable ASCII range (space through ~).
The barcode is built locally in your browser: a start character, your data characters, a modulo-103 checksum, and the stop pattern are converted to module-width tables, then painted onto a canvas bar by bar. The result is a standards-compliant Code 128B symbol that any common barcode scanner or phone app can read.
FAQ
Is this barcode generator free? Yes, completely free with no sign-up and no limits. Generate and download as many barcodes as you like.
Can I use the generated barcodes commercially — will they scan? Yes. The output follows the Code 128B standard with a proper checksum, so it scans with ordinary laser scanners, CCD readers and smartphone apps. When printing, keep the bars dark on a light background and leave quiet zones (blank margins) on both sides for reliable reads.
Is my data uploaded or stored anywhere? No. Everything runs locally in your browser — nothing you type is ever sent to a server, and no account is needed.
Which characters are supported? Code 128B covers printable ASCII: upper- and lowercase letters, digits, space, and punctuation such as -, ., / and _. Accented characters, emoji and control characters are not encodable and will be flagged.