๐Ÿท๏ธ Code 128 Barcode Generator

Bar color#000000
Background#ffffff

Code 128 is a versatile 1D barcode that can encode letters, digits, and symbols. It is widely used in logistics and inventory management.

Generate a Code 128 1D barcode from any text. It supports a wide range of letters, numbers, and symbols and is commonly used in logistics and inventory management โ€” useful for a shelf label or a sample barcode for inspection workflows.

How to use

  1. Enter the text you want to encode as a barcode.
  2. Adjust the foreground and background color if needed.
  3. Copy the generated barcode as SVG, or download it.

How the calculation works

Generate Code 128, a one-dimensional barcode widely used in logistics and inventory, from letters, digits and symbols. It can represent all 128 ASCII characters (upper and lower case letters, digits, symbols and control characters). Code 128 has three code sets: A for upper case and control characters, B for letters and symbols, and C, which packs digits two at a time. The shortest combination for your input is chosen automatically, so runs of digits make very compact barcodes. A check character (modulo 103) is added automatically to catch misreads. Japanese and other non-ASCII characters cannot be represented, so they produce an error.

Worked example

โ€œABC-123โ€ โ†’ a barcode that reads back exactly โ€œ0123456789โ€ (10 digits) โ†’ packed two at a time in code set C for a short barcode GS1-128, common on shipping labels, is built on Code 128.

Things to be aware of

  • For Japanese or other non-ASCII text, use a QR code (in Code 128 it would read back garbled).
  • Leave a margin of at least ten times the narrowest bar on each side for reliable scanning.
  • You can check barcodes made here with this siteโ€™s Barcode Reader.

FAQ

What characters can I enter?

A wide range of ASCII characters, including letters, numbers, and symbols.

What export formats are available?

Download as SVG or PNG for printing or pasting into digital documents.

Is this useful as a sample barcode for logistics or inventory?

Yes โ€” encode any management number or product code to use as a shelf label or inspection sample within your organization.

How is this different from a QR code or JAN code?

Code 128 is a 1D (horizontal) barcode known for handling a wide range of letters, numbers, and symbols directly โ€” unlike a numeric-only format like JAN, it can encode arbitrary text.

What equipment do I need to scan it?

Any Code 128-capable barcode scanner or scanning app works. The Barcode Reader tool on this site also supports it.