Free Code 128 Barcode Generator — Create, Preview & Download Instantly
Generate Code 128 barcodes online for free — no signup, no software, no limits. Enter any alphanumeric string and get a crisp, scannable barcode in PNG or SVG format within seconds. Code 128 supports the full ASCII character set, making it ideal for shipping labels, inventory tracking, retail SKUs, and logistics applications. Real-time preview updates as you type. Download, bulk-generate, or copy your barcode instantly.
What Is Code 128?
Code 128 is a high-density, variable-length linear barcode symbology that can encode the full 128-character ASCII set — including uppercase and lowercase letters, digits, punctuation, and control characters. Standardized under ISO/IEC 15417, it is one of the most widely used 1D barcodes in the world, adopted across shipping, warehousing, retail, healthcare, and manufacturing. Code 128 automatically selects the most compact encoding subset (A, B, or C) based on your input data, achieving the smallest possible barcode width for any given string. Every Code 128 barcode includes a Mod 103 check character calculated automatically, ensuring reliable scanner reads even in demanding environments.
- Full ASCII Support — Letters, Digits, and Special CharactersCode 128 encodes all 128 ASCII characters: uppercase and lowercase letters (A–Z, a–z), digits (0–9), and the full range of punctuation and control characters. Unlike Code 39 or ITF, you are not limited to a restricted character subset. Any printable or non-printable ASCII value can be encoded in a single Code 128 barcode, making it the go-to format when your data contains mixed case, special symbols, or varying lengths.
- Three Encoding Subsets: A, B, and CCode 128 uses three internal encoding modes. Subset A encodes uppercase letters, digits, and ASCII control characters (NUL–US). Subset B encodes the full printable ASCII range including lowercase letters. Subset C encodes pairs of digits (00–99) in a single symbol, halving barcode length for numeric-only data. Code 128 (auto mode) switches between subsets within a single barcode to maximize density, while Code 128A, Code 128B, and Code 128C lock to a specific subset.
- Automatic Mod 103 Check DigitEvery Code 128 barcode includes a mandatory check character computed using the Mod 103 algorithm. This check digit is calculated automatically — you never need to compute or append it manually. The check character allows scanners to detect and reject corrupted reads caused by printing defects, label damage, or poor scan angles, giving Code 128 excellent reliability in high-throughput scanning environments.
- Industry Standard: Shipping, Retail, and LogisticsCode 128 is the backbone of GS1-128 (formerly UCC/EAN-128) logistics labels, used by UPS, FedEx, Amazon, and major retailers worldwide. It is the required format for SSCC shipping carton labels, FBA inventory labels, and most warehouse management systems. Its combination of compact size, full character support, and high scanner compatibility makes it the default choice wherever a general-purpose 1D barcode is needed.
- High-Density Encoding — Compact and ScannableCode 128 achieves one of the highest data densities among linear barcodes. By using variable-width bars and spaces across 11 modules per character, it encodes more data per inch than Code 39 or Codabar. For numeric data specifically, Code 128C encodes two digits per symbol character — making it the most compact 1D barcode available for purely numeric strings such as serial numbers, lot numbers, and GTINs.
How to Create a Code 128 Barcode — Step-by-Step
Creating a scannable, print-ready Code 128 barcode with this free online generator takes under a minute. Follow these four steps:
Who Should Use This Code 128 Barcode Generator?
This free online Code 128 generator is built for anyone who needs reliable, production-quality barcodes without investing in specialized software. Here is who benefits most.
Shipping and Fulfillment Operations
Generate Code 128 tracking and routing labels for parcels, cartons, and pallets. Bulk-import shipment IDs from your order management system and produce print-ready labels in seconds without dedicated label software or a paid barcode service.
Retailers and E-Commerce Sellers
Create internal product labels, pick-and-pack stickers, and warehouse location codes using Code 128. Import your full product catalog from a spreadsheet, generate all barcodes in bulk, and print onto standard label stock at no cost.
Healthcare Administrators
Produce Code 128 barcodes for patient wristbands, specimen collection tubes, medication packages, and medical equipment labels. Rely on automatic Mod 103 check-digit computation for verified, reliable scanner reads in clinical workflows.
Developers and System Integrators
Quickly prototype or test Code 128 barcode integrations without setting up a local barcode library. Generate reference barcodes to validate scanner configuration, check digit logic, or label layout before deploying a production encoding pipeline.
Code 128 Barcode Generator Features
Everything you need to create production-quality Code 128 barcodes — from real-time preview and format auto-selection to bulk generation, size controls, and lossless SVG output.
Auto Subset Selection (A / B / C)
In Code 128 auto mode, the encoder analyzes your input and automatically switches between subsets A, B, and C within a single barcode to produce the shortest possible symbol. Long numeric runs are encoded using subset C (two digits per character); lowercase or mixed content uses subset B; control characters use subset A. The result is the most compact Code 128 barcode for any input without any manual configuration.
Real-Time Preview as You Type
The barcode preview updates live with every keystroke. See the exact barcode that will be generated — including bar pattern, human-readable text, and overall proportions — before downloading. Invalid characters for the selected subset are flagged immediately so you can correct input before it reaches a printer or label system.
PNG and SVG Download
Download your Code 128 barcode as a high-resolution PNG for documents, labels, and email, or as a lossless SVG for print-ready workflows, label templates, and vector graphics editors. SVG barcodes scale to any size without pixelation, making them ideal for large-format printing, screen display, and embedding in web pages or design files.
Adjustable Width, Height, and Quiet Zone
Control every visual parameter of your Code 128 barcode: bar height, module width (X-dimension), font size for the human-readable text, and quiet zone width on each side. Quiet zones — the mandatory blank spaces left and right of the barcode — are required for scanner reliability and are included automatically at the correct minimum width per ISO/IEC 15417.
Human-Readable Text — Show or Hide
Toggle the human-readable interpretation (HRI) text below the barcode on or off. When shown, the encoded value is printed beneath the bars in a clear, standard font — required on many shipping and retail labels so operators can read the value visually without a scanner. Hide the HRI for space-constrained labels or when embedding barcodes in applications that display the value separately.
Bulk Barcode Generation
Generate hundreds of unique Code 128 barcodes in one operation using the bulk input panel. Enter one value per line and download all barcodes as a ZIP archive of PNG or SVG files. Ideal for producing serialized shipment labels, inventory stickers, or product tags from an exported SKU list without manual one-by-one generation.
No Signup, No Watermarks, No Limits
This Code 128 generator is completely free with no usage caps, no account required, and no watermarks on downloaded files. All barcode encoding happens in your browser — your input data is never transmitted to any server. Generate one barcode or ten thousand; the tool imposes no limits and retains no data.
Color Customization
Change the foreground bar color and background color of your Code 128 barcode to match brand guidelines or label stock. Custom colors are fully supported for SVG and PNG output. Note that high contrast between bars and background is required for reliable scanning — dark bars on a light background are strongly recommended for any operational barcode.
Code 128 Use Cases & Real-World Examples
Code 128 is used across virtually every industry that requires machine-readable labels. Here are the most common real-world applications.

Shipping and Logistics Labels
Code 128 is the standard barcode for parcel and shipping labels used by carriers worldwide. Encode tracking numbers, shipment IDs, and routing codes into a single compact barcode. Its high scanner reliability and full ASCII support make it the preferred format for conveyor-belt scanning systems in distribution centers.

Warehouse Inventory and SKU Labels
Print Code 128 SKU labels for warehouse shelving, bin locations, and inventory management. Encode alphanumeric SKU codes, lot numbers, or internal product identifiers. Bulk-generate from a WMS export and print onto Avery or A4 label stock without any dedicated label software.

Healthcare Patient and Specimen Labels
Code 128 is widely adopted in healthcare for patient wristbands, specimen container labels, and medication dispensing. Its ability to encode alphanumeric identifiers of varying length, combined with mandatory check-digit verification, makes it one of the most reliable formats for clinical environments where scan accuracy is critical.

Retail Product Labels and Price Tags
Retailers use Code 128 for internal product labels, price tags, and promotional stickers when EAN or UPC is not required. Unlike EAN-13 or UPC-A, Code 128 has no fixed length constraint — you can encode short codes or long alphanumeric product identifiers in the same format without separate configurations.

Document and File Tracking
Law firms, government agencies, and healthcare providers use Code 128 barcodes to track physical documents through scanning workflows. Encode document IDs, case numbers, or file references into Code 128 barcodes printed on folder labels or cover sheets for automated sorting, routing, and retrieval.

Access Control and Event Ticketing
Code 128 is used for event tickets, access passes, and membership cards where a compact 1D barcode is preferred over a QR code. Encode booking reference numbers, seat identifiers, or member IDs. Code 128's high scan speed on linear scanners makes it particularly well-suited for high-throughput access gate environments.
Code 128 Barcode — Frequently Asked Questions
Technical answers to the most common questions about Code 128 encoding rules, character support, subsets, check digits, and practical usage.
What characters can Code 128 encode?
Code 128 can encode all 128 ASCII characters — digits 0–9, uppercase letters A–Z, lowercase letters a–z, punctuation marks, and control characters (NUL through DEL). This makes it one of the most flexible 1D barcodes available. The specific characters supported depend on the subset used: Subset A covers digits, uppercase letters, and control characters; Subset B adds lowercase letters and additional punctuation; Subset C encodes digit pairs only. Code 128 (auto) combines subsets within a single barcode for maximum flexibility.
What is the difference between Code 128, Code 128A, Code 128B, and Code 128C?
Code 128 (auto) automatically mixes subsets A, B, and C within a single barcode to encode any ASCII input as compactly as possible. Code 128A is locked to subset A and encodes uppercase letters, digits, and ASCII control characters (0x00–0x5F). Code 128B is locked to subset B and encodes the full printable ASCII range including lowercase letters (0x20–0x7F). Code 128C is locked to subset C and encodes digit pairs (00–99), halving the barcode width compared to Code 128B for pure numeric data. Use auto mode unless you have a specific system requirement to lock to a single subset.
Does Code 128 have a check digit?
Yes. Every Code 128 barcode contains a mandatory check character computed using the Mod 103 algorithm. The check character is based on a weighted sum of all symbol character values and is appended automatically by the encoder. You do not need to calculate or include it manually. Scanners verify the check character during decoding and reject reads where it does not match, providing a built-in error detection layer.
Is there a minimum or maximum length for Code 128?
Code 128 has no fixed minimum or maximum data length defined by the standard, though most implementations require at least one data character. Practical upper limits are determined by the physical space available on your label — very long strings produce wide barcodes. There is no artificial software limit in this generator. For pure numeric strings, Code 128C encodes two digits per character and produces the narrowest barcode for long numeric sequences.
When should I use Code 128 instead of Code 39 or EAN-13?
Choose Code 128 over Code 39 when your data includes lowercase letters, special characters, or when barcode size matters — Code 128 is significantly more compact than Code 39 for the same data. Choose Code 128 over EAN-13 or UPC-A when your data is not a standardized retail product GTIN, has variable length, or contains non-numeric characters. Use EAN-13 or UPC-A only for retail products that require GS1 standard barcodes for point-of-sale scanning.
What is the quiet zone requirement for Code 128?
ISO/IEC 15417 requires a minimum quiet zone of 10 times the X-dimension (module width) on each side of a Code 128 barcode, or at least 2.54mm — whichever is greater. The quiet zone is the blank white space to the left and right of the bars that tells the scanner where the barcode starts and ends. This generator automatically includes correct quiet zones at the default and custom widths. Do not crop or print over the quiet zones.
What resolution should I use when downloading Code 128 barcodes as PNG?
For printed labels, download the barcode as SVG whenever possible — SVG is resolution-independent and will print at any size without pixelation. If you require PNG, use a resolution of at least 300 DPI for labels up to 100mm wide, or 600 DPI for small labels below 25mm. Low-resolution PNGs (72 or 96 DPI) are suitable for screen display only and will produce blurred, unreadable barcodes when printed.
Is my data safe when using this generator?
Yes. All Code 128 encoding is performed entirely in your browser using client-side JavaScript. Your input data — including any product codes, serial numbers, or tracking identifiers — is never transmitted to any server and never stored anywhere. Close the browser tab and all data is gone. This tool is safe to use with sensitive internal identifiers.
Generate Your Code 128 Barcode Now — Free, Instant, No Account Required
This free Code 128 barcode generator is ready to use immediately. Type your data, adjust the size and appearance, and download a print-ready PNG or SVG barcode in seconds. No signup, no watermarks, no usage limits. All encoding happens locally in your browser — your data stays private. Generate one barcode or thousands; the tool is completely free regardless of volume.
