Free for commercial use. No account, no expiry.

ScanCodeGenerator

Code 128 Barcode Generator

By , Ready Utilities

This Code 128 barcode generator makes the code you want for anything that never crosses a retail till. It takes letters, digits and punctuation, packs them tightly, and needs no registration with anyone.

On this page

Build your Code 128 code

Size, colour and export options

Never set this to zero. A cropped quiet zone is the most common reason a printed barcode will not scan.

Preview

 

What was checked

    Verify any code by test scanning a printed sample before a production run. Provided as is, and used at your own risk. See the terms.

    What Code 128 is

    Code 128 encodes the complete ASCII set, characters 0 through 127, which means your SKU can read SHELF-A4-BIN12 rather than being forced into digits. It is variable length, so it grows with the data rather than padding it.

    The density comes from three internal subsets, A, B and C. Subset C encodes pairs of digits in the space a single character normally takes, so a long numeric string compresses to roughly half the width. The encoder switches between subsets automatically, which is why you never have to think about it.

    Every Code 128 carries a modulo 103 check character calculated by the encoder. You never type it and you will not see it in the human-readable text, because the specification says start, stop and check characters are not printed.

    GS1-128 is Code 128 with structure added: Application Identifiers mark up what each part of the data means, so one symbol can carry a product number, a batch, an expiry date and a serial, each labelled.

    Code 128 specification

    Figures come from the governing specification named in the last row.
    Character setFull ASCII, characters 0 to 127
    LengthVariable, no specification limit
    Check characterModulo 103, calculated automatically, never printed
    X-dimension0.19mm (7.5 mil) practical minimum
    Quiet zoneAt least 10 times the X-dimension, or 0.25 inch, whichever is greater
    Governed byISO/IEC 15417

    Length has no limit, but width does

    The specification sets no maximum character count, which is not the same as saying long values are a good idea. Every character adds 11 modules of width, so a forty-character value at a readable X-dimension produces a symbol too wide for most labels and too wide for a scanner to capture in one pass.

    If you are encoding more than about twenty characters, consider whether a 2D code like Data Matrix fits the job better. And note that GS1-128 specifically does cap data at 48 characters and 165.10mm of physical length.

    Sources

    Every specification figure on this page traces to one of the following. Nothing is stated here that could not be checked against them.

    1. ISO/IEC 15417, Code 128 symbology specification
    2. GS1 General Specifications, GS1-128 data and length limits
    3. GS1 General Specifications size limits, as published by GS1
    4. bwip-js, MIT-licensed barcode encoder implementing the ISO/IEC symbologies

    Last reviewed 6 September 2026

    This page is maintained by Cedrick Reese at Ready Utilities. The Code 128 character set, subset behaviour and modulo 103 check character are defined in ISO/IEC 15417, and encoding is performed by the MIT-licensed bwip-js library at a pinned version, which implements that specification. The quiet zone requirement and the GS1-128 limits of 48 data characters and 165.10mm are taken from the GS1 General Specifications and are rechecked when this page is updated.

    Common questions

    Does Code 128 support letters?

    Yes. It encodes the full ASCII set, which includes uppercase and lowercase letters, digits, punctuation and control characters. That is its main advantage over UPC, EAN and ITF-14, which are numeric only.

    What is the difference between Code 128 and GS1-128?

    GS1-128 is Code 128 with GS1 Application Identifiers giving structure to the data, so a scanner knows which part is a product number and which is an expiry date. Plain Code 128 has no such structure, which is fine for internal use.

    Do I need to add a check digit to Code 128?

    No. The modulo 103 check character is calculated by the encoder and is never typed by you or shown in the human-readable text.

    Is Code 128 free to use?

    Yes. Unlike retail UPC and EAN numbers, Code 128 requires no registration with any body. The value only has to be unique within your own system.