Code 128 Generator
Code 128 Generator passes trimmed text to the Code 128 encoder and renders a PNG canvas with human-readable text. Code 128 supports a broad character set and can switch among code sets for density, but generation does not assign a product identifier, register data, verify scanner workflow, or guarantee print quality.
Runs locally — files stay on your deviceIs Code 128 the same as a GS1-128 logistics symbol?
No. GS1-128 uses Code 128 symbology plus FNC1 and GS1 Application Identifier rules; this page generates ordinary Code 128.
Code 128 is a dense linear symbology with multiple code sets
Bars encode start, data, checksum, and stop patterns. A scanner returns the encoded text; business meaning comes from the application.
How it works
Enter text and generate. bwip-js renders Code 128 at scale 3, height 15, includes human-readable text, and offers a PNG download.
Key concepts
Symbology is not data governance
The barcode can encode duplicates or arbitrary values.
Print quality matters
Bar width, quiet zones, contrast, scaling, and substrate affect scanning.
When to use it
- Create an internal test label.
- Encode mixed text in a general linear barcode.
- Evaluate scanner readability for a controlled value.
When not to use it
- Do not call it GS1-128 without GS1 formatting.
- Do not use it as a registered retail product code.
- Do not deploy without print-verification tests.
Worked examples
Inventory id
- Input
BOX-2026-0042- Expected output
Code 128 PNG
Mixed letters, digits, and hyphen are encoded.
Dense digits
- Input
123456789012- Expected output
Compact Code 128 representation
An encoder may use numeric code-set optimization.
GS1-looking data
- Input
(01)123…- Expected output
Ordinary text barcode
Application Identifiers are not semantically configured.
Common mistakes
Confusing Code 128 and GS1-128
GS1 requires additional control and data rules. Correction: Use a GS1-compliant workflow.
Stretching the image
Non-integer scaling can blur bars. Correction: Preserve module proportions.
Skipping verification
On-screen success does not prove printed scans. Correction: Test production printers and scanners.
Best practices
- Use unique governed identifiers.
- Preserve quiet zones and integer scaling.
- Verify printed labels with target scanners.
Related operations and differences
Code 39 Generator
Choose Code 39 Generator when you need to generate a Code 39 barcode.; use Code 128 Generator specifically for barcode code128.
EAN-13 Generator
Choose EAN-13 Generator when you need to generate an EAN-13 retail barcode.; use Code 128 Generator specifically for barcode code128.
EAN-8 Generator
Choose EAN-8 Generator when you need to generate a compact EAN-8 barcode.; use Code 128 Generator specifically for barcode code128.
UPC-A Generator
Choose UPC-A Generator when you need to generate a UPC-A product barcode.; use Code 128 Generator specifically for barcode code128.
Bitcoin Payment QR Code
Choose Bitcoin Payment QR Code when you need to create a Bitcoin payment URI QR code.; use Code 128 Generator specifically for barcode code128.
Contact vCard QR Code
Choose Contact vCard QR Code when you need to create a contact card QR code.; use Code 128 Generator specifically for barcode code128.
Limitations and privacy
- Ordinary Code 128 only.
- No GS1 FNC1/Application Identifier validation, registration, duplicate detection, or print-grade verification.
- Rendering settings are fixed.
Generation happens locally in this browser. The PNG contains the entered payload, so share it with the same care as the underlying data.
Frequently asked questions
Is this GS1-128?
No.
Is a check symbol included?
The encoder handles the symbology checksum.
Does it register identifiers?
No.
Should printed output be tested?
Yes.