How to use Barcode Generator — Code 128 and EAN-13, Free
- 1Pick the barcode format: Code 128 for any text, or EAN-13 for a product code.
- 2Type the value, then set the height, bar width and whether to print the text underneath.
- 3Download the barcode as SVG for print, or PNG for the web.
About Barcode Generator
Code 128 is the workhorse of internal barcodes. It carries the full printable ASCII range, which means an order reference like INV-00417/B goes in unchanged, and it is dense: a numeric mode packs two digits into one symbol, so a long stock number takes roughly half the width it would as letters. The encoder switches between text and numeric mode as it walks your string, appends the modulo-103 check symbol every scanner verifies, and terminates with the stop pattern — all of which happens here without you choosing anything. The one hard limit is the character set: anything outside ASCII 32 to 126, including accented letters and emoji, is rejected with a message rather than silently mangled into a code that scans as something else.
EAN-13 is a fixed structure rather than a free-form encoding, and it is worth knowing why the 13th digit exists twice over. The symbol is always 95 modules wide: a three-module start guard, six digits, a five-module centre guard, six more digits, and a three-module end guard. Only twelve of the thirteen digits are drawn as bars. The first digit is not drawn at all — it is encoded in which of two patterns each of the next six digits uses, so a scanner recovers it from the parity of the left half. The final digit is the check digit, derived from the other twelve by the 1-and-3 weighting the tool spells out on screen. That is why you can type twelve digits and get a complete, correct code back, and why pasting thirteen lets the tool verify rather than guess.
Getting a barcode to scan is mostly a printing problem, not an encoding one. Keep the quiet zone: the blank margin either side is part of the symbol, and cropping tight to the bars is the single most common reason a label fails to read. Print at a size where the narrowest bar survives your printer and your substrate, which for a thermal label usually means exporting the SVG and letting the label software scale the vector rather than stretching a small bitmap. Two honest limitations of the artwork produced here: the guard bars are drawn the same height as the data bars rather than extended below them, and the human-readable number is centred under the whole symbol instead of being split either side of the centre guard as it is on retail packaging. Scanners are indifferent to both, but a print house working to a GS1 artwork specification will want the traditional layout, so treat this as a working barcode rather than final retail packaging artwork.