Skip to content
StylQR home

Code 128 Barcode Generator

Create Code 128 barcodes for inventory, asset tags, shipping and anything that is not a retail product. Type any text — letters, numbers and punctuation — and download a crisp, scannable barcode.

  • Free & unlimited
  • Validated live
  • Print-ready SVG, PDF & PNG
  • Nothing uploaded
1

Enter your data

Checked live against the official rules for this barcode type.

Any ASCII text — letters, digits and punctuation.

2

Design your barcode

Pick a label template or adjust size, text, colors and style.

Start from a template

One click styles the label. Your data and size stay as they are.

Check your data

Tap to preview

Preview & download

Loading barcode engine…

Format

Resolution

Print labels

A vector PDF filled with your barcode — print on label stock, stickers or plain paper.

Square cells with dashed cut guides; choose 2–6 columns.

Labels per row

What is Code 128?

Code 128 is the most widely used general-purpose 1D barcode. It encodes all 128 ASCII characters, is compact and reliable, and is read by virtually every barcode scanner and phone app.

It uses three code sets: A for uppercase letters and control characters, B for upper- and lowercase letters, and C, which packs two digits into each symbol character. The encoder switches between them automatically to keep the barcode as short as possible — long numbers in particular become much narrower than in Code 39.

Every Code 128 barcode ends with a mandatory modulo-103 check character, calculated automatically and never printed in the text. Each character is 11 modules wide, made of three bars and three spaces.

Specification

Code 128 at a glance

Type
Linear (1D)
Characters
All 128 ASCII characters (code sets A, B and C)
Length
Variable; keep under about 48 characters for easy scanning
Check digit
Modulo 103 (mandatory, added automatically)
Nominal bar width
0.25–0.5 mm typical; 0.33 mm default
Recommended height
15% of the width or at least 6.35 mm; 15 mm default
Quiet zone
10 modules each side
Standard
ISO/IEC 15417

How to create a Code 128 barcode

Four steps from data to a print-ready file.

  1. 1

    Step 1

    Enter your Code 128 data. Any ASCII text — letters, digits and punctuation.

  2. 2

    Step 2

    Check the live validation — check digits are added for you and any problem is explained in plain words.

  3. 3

    Step 3

    Pick a label template or adjust bar width, height, text, colours and style. The printed size updates as you go.

  4. 4

    Step 4

    Press Test scan, then download a PNG at up to 1200 DPI, vector SVG or PDF — or print it on label sheets.

Built for people who print barcodes

Details most barcode generators charge for — all free in the studio above.

  • Check digits, fixed for you

    Type 12 digits and the EAN-13 check digit is added. Type a wrong one and you get the correct digit with a one-click fix.

  • Frames & label templates

    Banners, tickets, hang tags, shelf prices, coupons and more — ready-made labels that never cover the bars.

  • Sized in millimetres

    Set the bar width and height and see the finished printed size update live, in mm or inches.

  • Crisp at any DPI

    PNG at 300, 600 or 1200 DPI with every bar a whole number of pixels, plus vector SVG and exact-size PDF.

  • Scanner-safe colours

    Warnings for red bars laser scanners cannot see, low contrast, thin bars and tight quiet zones.

  • GS1 helper

    Insert Application Identifiers like GTIN, expiry, batch and serial with one click — validated by the official rules.

  • Avery label sheets

    Fill Avery 5160, L7160 and 22805 sheets, sticker sheets or a label grid with one click.

  • Save, open & share

    Keep a barcode as a design file, reopen it later, share a link, and undo or redo any change.

Where Code 128 is used

Real-world applications for this symbology.

  • Inventory & SKUs

    Internal product codes, stock labels and bin locations in warehouses and shops.

  • Asset tags

    Laptops, tools, furniture and equipment tracked with a serial or asset number.

  • Shipping labels

    Courier tracking numbers and order references printed on parcel labels.

  • Manufacturing

    Work orders, part numbers and serial numbers on production lines.

  • Healthcare & labs

    Patient wristbands, sample tubes and specimen labels.

  • Documents & files

    Document IDs on forms, invoices and archive boxes for fast lookup.

Printing Code 128 that scans first time

Small details that make the difference between a code people ignore and one they scan.

  • Numbers with an even number of digits are encoded most compactly, using code set C.

  • For thermal label printers, choose a bar width that is a whole number of printer dots (for example 0.25 mm at 203 dpi is 2 dots).

  • Keep 10 modules of blank space on each side — about 3.3 mm at the default bar width.

  • Avoid very long values: if the barcode gets wider than your scanner’s field of view, use Data Matrix instead.

  • Use GS1-128 rather than plain Code 128 when your data contains GTINs, batches or dates for a supply chain partner.

Code 128 questions, answered

Can Code 128 encode lowercase letters?

Yes. Code 128 covers the full ASCII set, including lowercase letters, punctuation and spaces.

Can I use Code 128 on retail products?

Not at the checkout — retail point-of-sale systems expect EAN-13 or UPC-A. Code 128 is ideal for internal codes, inventory and shipping.

Do I need to add a check digit?

No. The mandatory modulo-103 check character is added automatically by the encoder and decoded silently by the scanner.

Code 128 or Code 39?

Choose Code 128 unless a system requires Code 39. It holds more characters, produces shorter barcodes and has built-in error checking.

What are Code 128A, B and C?

They are the three code sets inside Code 128. You do not need to choose one — the generator mixes them automatically for the shortest barcode.

Every other barcode type

Retail, logistics, 2D, healthcare and postal symbologies — validated with the official rules and ready to print.

The barcodes people make most.