Barcode Generator - Free Code128 Creator Online
Generate Code128 barcodes online instantly. Create free printable SVG and PNG barcodes with custom sizes, colors, and text.
Updated
What is the Barcode Generator - Free Code128 Creator Online?
Generate perfect Code128 barcodes instantly in your browser — no signup, no watermark, no server uploads. This free online barcode generator creates print-ready SVG and PNG files for inventory, shipping, retail, and product labels.
Why Code128? It's the universal workhorse of logistics. Unlike UPC or EAN, Code128 encodes full alphanumeric text (A-Z, 0-9, symbols) and automatically compresses numbers for maximum density. Our generator uses true AUTO mode, switching between Code Set B and C to produce the shortest possible barcode every time.
What you get
- 100% client-side: your data never leaves your device
- Live preview as you type with instant validation
- SVG and high-DPI PNG downloads for crisp printing at any size
- Full control: height, bar width, quiet zone, colors, text, and font size
- Built-in checksum calculation per ISO/IEC 15417 standard
Perfect for small businesses, warehouses, Etsy sellers, Amazon FBA prep, and developers who need reliable barcodes without installing software or paying per label.
How it works
Our generator implements the official Code128 specification directly in your browser using pure TypeScript. No images are uploaded or processed on a server.
Enter your data – Type any text using ASCII characters 32-126 (A-Z, a-z, 0-9, and symbols like - _ /). For best scanning, use 6–30 characters.
Choose mode – Leave on AUTO for automatic optimization. The encoder analyzes your string and switches to Code128C for runs of 4+ digits (saving one symbol per two digits), then back to Code128B for text. Choose B for pure text or C for digits-only.
Customize appearance – Adjust bar height (20–200px), module width (1x to 4x), quiet zone margin (the white space required for scanners), foreground/background colors, and whether to show human-readable text.
Validate and encode – The tool calculates the modulo-103 checksum, builds the exact 11-module patterns for each symbol (start, data, checksum, stop), and renders a crisp SVG using precise bar widths.
Export – Click Copy SVG for vector use in Illustrator, Figma, or web pages, or Download PNG for a 3× scaled raster perfect for thermal printers, PDFs, and labels. Everything happens locally — no data is stored or tracked.
Pro tip: For reliable scanning, use 2x bar width or higher, keep contrast high (black on white), and maintain at least 10x quiet zone on both sides.
Examples
Product SKU for inventory
Create a scannable Code128 barcode for warehouse labels and stock tracking
Compact numeric shipping code
Use Code128C auto-optimization for long digit strings
Custom branded label
Generate a barcode with custom colors and size for packaging
Frequently asked questions
What is a barcode generator?
What is a barcode generator?
A barcode generator is an online tool that converts text or numbers into a scannable pattern of bars and spaces. Our generator creates Code128 barcodes that work with any standard 1D laser or camera scanner for inventory, shipping, and product labeling.
What is Code128 and when should I use it?
What is Code128 and when should I use it?
Code128 is a high-density alphanumeric barcode that encodes all 128 ASCII characters. Use it for internal SKUs, warehouse bins, shipping labels, asset tags, and logistics — anywhere you need letters and numbers. Don't use it for retail products that require UPC or EAN at checkout.
Is this barcode generator free?
Is this barcode generator free?
Yes. It's completely free with no signup, no email required, no watermarks, and no usage limits. You can generate unlimited barcodes for personal or commercial use.
Do I need to install software?
Do I need to install software?
No. Everything runs 100% in your browser. Your data never leaves your device, which makes it faster and more private than server-based generators.
What formats can I download?
What formats can I download?
You get two formats: SVG (vector, infinitely scalable for print design) and PNG (high-DPI raster at 3× scale, perfect for thermal label printers, Word, or PDFs). You can also copy the SVG code directly.
How do I make my barcode scannable?
How do I make my barcode scannable?
Use high contrast (black bars on white background), set bar width to 2x or 3x, keep the quiet zone at 10mm or more, avoid scaling the image disproportionately, and test print at actual size. Ensure your scanner supports Code128 (most do).
What size should my barcode be?
What size should my barcode be?
For most desktop scanners, use height 50–80px and module width 2x. For small labels, don't go below 30px height and 1x width. For warehouse scanning from distance, use 100px+ height and 3x width. Always test with your actual scanner.
What's the difference between AUTO, B, and C?
What's the difference between AUTO, B, and C?
AUTO intelligently switches between Code Set B (for text) and Code Set C (for digit pairs) to create the shortest barcode. B encodes all letters, numbers and symbols. C encodes only digits but packs two digits into one symbol, making it 50% shorter for long numbers. AUTO is best for 99% of uses.
Why won't my barcode scan?
Why won't my barcode scan?
The most common causes are: low contrast, barcode too small, quiet zone cropped off, blurry printing, or using an unsupported character. Try increasing bar width to 3x, ensure white background, print at 300 DPI or higher, and verify your data uses only standard ASCII characters.
Can I use this for Amazon FBA or retail products?
Can I use this for Amazon FBA or retail products?
You can use Code128 for Amazon FBA box labels, internal inventory, and warehouse bins. You cannot use Code128 as the primary product barcode for retail checkout — that requires a GS1-registered UPC or EAN. Always check your marketplace requirements.
Is my data stored or sent to a server?
Is my data stored or sent to a server?
No. The entire encoding process happens locally in your browser using JavaScript. We don't see, store, or transmit the text you enter. Close the page and the data is gone.
Related tools
More utilities you might find handy.
Dot Grid Generator
Generate printable dot grids for bullet journals, sketching, and calligraphy.
Dummy Data Generator
Generate realistic fake test data including names, emails, addresses, and custom schemas for development and testing
Gitignore Generator
Generate a custom .gitignore file for any tech stack, framework, or language.