MockFoxAdvertise

Code 128 Barcode Generator

Updated Free mock REST & WebSocket APIs

Encode letters, digits and symbols as a compact Code 128 barcode. The generator switches between code sets A, B and C automatically for the shortest symbol and adds the check character for you.

Barcode type
Code 128 barcode for MOCKFOX-2026

Encoded MOCKFOX-2026 · Code sets B + C · check value 84 · 14 symbols · 352×122px

Size, text and colors
Bars
Background

🔒 Encoded and drawn in your browser — no uploads, no watermark, free for commercial use.

How to create a Code 128 barcode

  1. Type or paste your data — SKUs, serial numbers, tracking numbers, URLs (ASCII only).
  2. Check the summary line to see which code sets were used and the check value.
  3. Download SVG or PNG and place it on your label with its quiet zone intact.

Code sets A, B and C

SetCharactersStart value
AUppercase, digits, punctuation and control characters (ASCII 0–95)103
BUppercase, lowercase, digits and punctuation (ASCII 32–127)104
CPairs of digits 00–99 — two digits per symbol105

Code C halves the width of long numbers, so the encoder starts in C for 4+ leading digits and switches into C for runs of 4+ digits at the end or 6+ in the middle. Each symbol is 11 modules wide (three bars and three spaces), and the stop pattern is 13.

The check character

The checksum is the start value plus each symbol value multiplied by its position, modulo 103. For 1234 in Code C: 105 + 1×12 + 2×34 = 185, and 185 mod 103 = 82. Scanners verify it and don't show it, so it isn't printed in the human-readable text.

Related tools

Embed this tool on your site

Browse all embeddable tools →

Free for blogs, HR, payroll and contractor sites: copy one snippet — the widget sizes itself and matches your colors.

Get the embed code

Frequently asked questions

Code 128 vs. Code 39 — which is better?

Code 128 is denser (often half the width), supports lowercase and all ASCII, and has a mandatory check character. Use Code 39 only when a system requires it.

Can it encode GS1-128 (UCC/EAN-128)?

GS1-128 needs a special FNC1 character after the start code, which this tool doesn't add yet. Plain Code 128 works for most internal and shipping labels.

Is there a length limit?

The standard has none, but long codes get wide and harder to scan. This tool caps data at 80 characters; most scanners comfortably read 20–40.

Is anything sent to a server?

No. Everything is generated by JavaScript in your browser, so nothing you type or generate is uploaded, logged or stored. It keeps working offline once the page has loaded.

Your business here? Sponsor this tool from $16/week. See placements