Generate a Code 128 barcode and check it before printing

Create a Code 128 SVG locally, preserve quiet zones and distinguish an internal label from a registered retail product identifier.

Try the calculation or tool

Choose the barcode standard deliberately

This generator creates Code 128 for short printable ASCII identifiers. It is useful for an internal inventory or reference label when the receiving scanner expects Code 128. It does not assign a retail product number or register a code with GS1. If a retailer requires EAN, UPC or GS1-128, confirm that exact requirement before printing labels.

Enter the intended identifier

Type the exact value, including any meaningful leading zeros, and generate the preview. The library adds the Code 128 checksum automatically. Do not manually append a check digit from another barcode format. Avoid secrets in a label because anyone with an appropriate scanner can read its encoded value. The generator and SVG download run in the browser.

Preserve the white margins

A scanner needs quiet zones around the bars. Download the SVG and scale it proportionally; stretching only the width or height changes the geometry. Keep dark bars on a light background and avoid adding a logo across the symbol. A printer that blurs or fills narrow spaces can make an apparently sharp on-screen preview unreadable.

Verify with the actual scanner

Print a small test at the intended label size, scan it using the receiving equipment and compare the returned text character for character. Test leading zeros and punctuation if your identifiers contain them. A successful preview is not scanner certification. Keep the human-readable value below the barcode so an operator can recover from a damaged label, and check that the destination system maps the value to the correct record.

Sources and further reading