Free Tool

Code 128 Barcode Generator

Type any text or number and get a Code 128 barcode you can download as a PNG or SVG. Free, with no signup, no watermark and nothing uploaded.

Private by design: the barcode is built in your browser. What you type is never uploaded or stored.

About this barcode

The flexible, compact barcode

Code 128 is the general-purpose barcode. It can encode every character in the standard ASCII set: upper and lower case letters, digits, punctuation and spaces. That freedom makes it the usual choice for internal part numbers, shipping labels, serial numbers and anything else where you decide what the code says.

It is also compact. The format switches between three internal character sets, and when it meets a run of digits it packs them two at a time, so a long number takes noticeably less width than the same number in Code 39. A check character is built into the format and added automatically, so you never calculate one yourself.

If your characters are limited to capitals and digits and older equipment needs to read them, Code 39 is the long-established alternative.

Where it is used

Where Code 128 is used

Shipping and warehouse labels. Tracking numbers, pallet and parcel IDs and bin locations are very often Code 128.

Inventory and asset tags. Equipment, tools and stock items with codes you invent yourself.

Laboratories and healthcare. Sample tubes, slides and specimen labels that need short, dense codes.

Events and tickets. Entry codes and badges that a handheld scanner reads at the door.

Libraries and loans. Item and member numbers on cards and spines.

Retail products. Shop products sold to the public need a retail format such as EAN-13, which the checkout systems expect.

How to use it

Three simple steps

1. Type your text

Enter letters, digits and punctuation, up to 80 characters. Accented letters are not part of the standard set.

2. Set the size

Pick a bar width and height. Use 2 pixels or more for the bars, and make the barcode tall enough to sweep a scanner across.

3. Download and test

Save a PNG or SVG, print it at the size you intend to use, and scan it with the scanner you will actually use.

The details

What Code 128 can and cannot hold

This generator accepts the characters you can type on a normal keyboard, from space to tilde, up to 80 characters. Control characters and accented or non-Latin letters are rejected with a message naming the character, rather than being dropped silently.

Width grows with length. Each character takes about eleven bar-widths, plus a start pattern, the check character and a stop pattern, so a barcode of ten characters is far narrower than one of forty. If a label is narrow, shorten the data or use pure digits, which pack more tightly.

This tool makes standard Code 128. It does not make GS1-128, the variant that carries application identifiers in brackets for supply-chain labels. Those need special function characters that this generator does not include.

The number under the bars

Show the number in your own font

The text under the bars is the human-readable version, for the day a scanner fails. Search the font box and choose a clear typeface from the ProFont font library. The PNG download uses it. The SVG uses a standard font so it opens the same everywhere.

Number font ideas

Pick a font for the number

Logistics labels need numbers that stay legible at small sizes, and these three do. Three to try:

Guides worth reading

Type guides to go with your barcode

If the barcode is part of a larger label or sign, these guides cover the type:

Questions

Code 128 barcode FAQ

What is the maximum length?

This generator accepts up to 80 characters. Longer text makes a very wide barcode that is hard to fit on a label and hard to scan.

Do I need to add a check digit?

No. Code 128 includes a check character in its own structure and the generator adds it for you. It is not something you type.

Can I use lowercase letters and symbols?

Yes. Code 128 distinguishes upper and lower case and supports standard punctuation. Accented characters are not supported.

Is this the same as GS1-128?

No. GS1-128 is a Code 128 variant with a special structure for supply-chain data. This tool makes standard Code 128 only.

How big should I print it?

Keep bars at 2 pixels or wider on screen and scale proportionally in print. Always test with the scanner that will read it before printing a run.

More barcode formats

Make a different kind of barcode

Every format is free, private and made in your browser. Need a square code that holds a link or contact? The QR generator makes those.

Explore ProFont

Find the right font for anything

Search more than 2,000 fonts, see them in use and read the type guides.

More free tools

You might also like