Free Code 128 Barcode Generator

Code 128 is the general-purpose barcode: letters, digits, spaces and keyboard symbols in a compact row of bars. Type your text, check that it scans and download it for labels, asset tags, tickets or stock bins. It needs no registration.

Up to 80 letters, digits, spaces and keyboard symbols (plain ASCII, no accents or emoji).

15 mm
10 modules

The blank margin left and right of the bars, in modules (the width of the narrowest bar). Code 128 needs at least 10.

4×

Made in your browser; nothing you type is sent to QRdx. WebP and AVIF are encoded by QRdx's server when you pick them, and nothing is kept.

Where Code 128 barcodes are used

Inventory and stock labels, asset tags, library and lab samples, tickets, internal shipping labels and order numbers: anything that needs a barcode but isn't a product sold in shops.

It's the barcode most warehouse and point-of-sale scanners read out of the box, and the base of GS1-128, which adds Application Identifiers for supply chain data.

Do I need to register a Code 128 barcode?

No. Code 128 holds whatever text you choose, so there's no number to license. Use your own SKUs, serial numbers or IDs.

If a retailer or logistics partner asks for GS1 data (a GTIN, SSCC, batch or expiry date), use GS1-128 instead: it's Code 128 with GS1's structure.

What Code 128 can hold

What it takes

Up to 80 letters, digits, spaces and keyboard symbols (plain ASCII, no accents or emoji).

Example

QRDX-2026-0042

Up to 80 characters of plain ASCII: letters, digits, spaces and the symbols on a US keyboard. Accented letters, emoji and control characters can't be encoded here.

Code 128 adds its own check character (a sum modulo 103) and three code sets: set C packs two digits into each character, so long runs of digits make shorter barcodes. The encoder picks the code sets for you, and readers don't print the check character.

Code 128 barcode size

Sizes of the Code 128 example at the generator's default settings
Example as SVG, PDF or EPS69.9 × 19.2 mm
Module (narrowest bar)0.353 mm
Bar height15 mm
Quiet zoneAt least 10 modules each side; the generator starts with 10
  • Each Code 128 character is 11 modules wide, plus start, check and stop characters and 10 modules of quiet zone each side. With the downloads' 0.353 mm module, ABCDEFGHIJ is 58.2 mm wide and 1234567890 is 38.8 mm: the digits pair up.
  • A common rule for handheld scanners is bars at least 15% of the barcode's length, or 6.35 mm (a quarter inch), whichever is more. The default bar height is 15 mm.
  • There's no fixed size: shrink the module for small labels, but test with the scanners that will read it, especially on thermal label printers.

Code 128 barcode API

The same barcode is an image URL, with no API key: put it in an img tag, a label template or a product feed. It checks the value the way this page does, and allows 300 requests a minute per IP address. The barcode API docs list every option.

SVG image

https://api.qrdx.dev/v1/barcode?format=code128&data=QRDX-2026-0042

PNG, 3 pixels per module

https://api.qrdx.dev/v1/barcode?format=code128&data=QRDX-2026-0042&type=png&scale=3

In a web page

<img src="https://api.qrdx.dev/v1/barcode?format=code128&data=QRDX-2026-0042" alt="Code 128 QRDX-2026-0042" />

Code 128 barcode FAQ

Can Code 128 hold lowercase letters?

Yes. Unlike Code 39, it encodes upper and lower case, digits and symbols.

Why is my barcode so long?

Long text makes long barcodes: each letter adds 11 modules. Shorten the text, use digits where you can (they pair up), or use a 2D code such as Data Matrix, which holds far more in a small square.

Is Code 128 the same as GS1-128?

GS1-128 is Code 128 with a special first character (FNC1) and GS1 Application Identifiers. A plain Code 128 with GS1-looking text isn't a GS1-128, and GS1 systems won't treat it as one.

Other barcode types

All 11 barcode types

Barcodes are static: the data is in the bars, so they work offline and never expire. For a link people scan with a phone camera, use one of the QR code generators.

Make your next QR code in seconds.

Free forever. No signup, no watermark.

Start Creating QR Codes for Free