Barcode Generator
Generate Code 128 barcodes from text or numbers and download them as SVG or PNG. Vector output stays sharp at any size, which matters because a blurry barcode will not scan.
- Files never leave your device
- Free, no signup
- No watermarks
- Works offline once loaded
How to barcode generator
- 1
Enter your data
Any printable ASCII — a product code, SKU, serial number or reference.
- 2
Adjust the size
Module width and height. Wider modules scan more reliably.
- 3
Download
SVG for print and labels, PNG for screens and documents.
Why Code 128 rather than the more familiar retail barcode
The barcode most people picture — the one on a supermarket product — is EAN-13 or UPC-A, and both are fixed-length, purely numeric formats tied to a registration system: the numbers themselves are assigned centrally by GS1 to specific manufacturers and products, meaning a generator cannot simply invent a valid one for an arbitrary use without either coordinating with that registry or producing a number that collides with someone else's legitimately registered product. Code 128 has no such registration requirement and no fixed length — it can encode any printable ASCII text or number, from a short internal SKU to a long alphanumeric reference code, which is precisely what makes it the right general-purpose choice for a barcode generator rather than a retail-specific one bound to a registry this tool has no part of.
Why the quiet zone is not optional whitespace
The blank margin required on either side of a barcode's bars — called the quiet zone — is not decorative spacing that can be trimmed to save room on a label; it is how a scanner's decoding algorithm locates where the actual symbol begins and ends in the first place. A scanner sweeping across an image is looking for the transition from a large blank region into the barcode's bar pattern, and cropping that margin off, or placing text or another graphic element too close to the edge of the bars, removes the signal the scanner needs to even recognise that a barcode starts there — this is one of the single most common reasons a printed barcode fails to scan despite looking perfectly fine to the naked eye, and it has nothing to do with the encoded data being wrong.
How Code 128 packs numbers more efficiently than letters
Code 128 actually contains three internal encoding subsets, and the generator switches between them automatically depending on the content: Code C packs two digits into a single symbol whenever an even-length run of digits appears, which is roughly twice as space-efficient as encoding one character per symbol. The moment a letter, a mixed case change, or an odd-length digit run appears, the encoding falls back to Code B, which encodes exactly one character per symbol. This is the reason a purely numeric barcode — a product code or an order number made entirely of digits — comes out noticeably narrower than a barcode encoding the same number of characters mixed with letters, even though both represent a valid, correctly scannable Code 128 symbol.
Frequently asked questions
Why Code 128 and not another symbology?
It encodes the full printable ASCII set, is self-checking via a checksum, and is universally readable. EAN-13 and UPC-A are fixed-length numeric formats tied to registered product numbers you cannot invent, so they are the wrong choice for a general-purpose generator.
Should I download SVG or PNG?
SVG for anything printed. A barcode is line art, and a raster image scaled up develops soft edges that scanners genuinely fail on. PNG is fine for on-screen use at the exact size generated.
Why is my numeric barcode narrower than a text one?
Because an even-length string of digits is encoded in Code C, which packs two digits into every symbol and roughly halves the width. Add a letter and it falls back to Code B, which encodes one character per symbol.
What is the quiet zone and why does it matter?
The blank margin either side of the bars. The specification requires at least ten modules, and scanners use it to find where the symbol begins. Cropping it off is one of the most common reasons a printed barcode will not read.
Can it encode accented or non-Latin characters?
No — Code 128 covers printable ASCII only, and the tool says so rather than silently dropping characters. For arbitrary Unicode, a QR code is the right format.
Common barcode generator tasks
You might also need
QR Code Generator
Create QR codes for links, text, WiFi and more
UUID Generator
Generate v4 and v7 UUIDs in bulk
Color Picker & Converter
HEX, RGB, HSL, CMYK and contrast checking
Invoice Generator
Create and download a professional invoice as a PDF
Password Generator
Create strong random passwords and passphrases
Resume Builder
Build a clean, ATS-friendly resume and download it as a PDF